Skip to content

Commit ae20d31

Browse files
committed
rustdoc: yeet TypingEnv::from_param_env
1 parent f74951f commit ae20d31

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,9 +1817,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T
18171817
let ct = if let hir::ConstArgKind::Anon(hir::AnonConst { def_id, .. }) =
18181818
const_arg.kind
18191819
{
1820-
// Only anon consts can implicitly capture params.
1821-
// FIXME: is this correct behavior?
1822-
let typing_env = ty::TypingEnv::from_param_env(cx.tcx.param_env(*def_id));
1820+
let typing_env = ty::TypingEnv::post_analysis(cx.tcx, *def_id);
18231821
cx.tcx.normalize_erasing_regions(typing_env, ct)
18241822
} else {
18251823
ct

0 commit comments

Comments
 (0)