diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-12 23:28:25 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-13 07:29:34 +0200 |
| commit | 6e4779ab1775d0901408c08d64dc12c735069701 (patch) | |
| tree | c9b26f901b489aa15840a10b12556ea3a7b87b7a /src | |
| parent | e5fedceabf4e0564231db592b6d1f35e1ca27908 (diff) | |
make the eval() functions on our const types return the resulting value
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index f30384701cb..190b1b038b6 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1863,7 +1863,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T // does nothing for `ConstKind::Param`. let ct = ty::Const::from_anon_const(cx.tcx, anon_const.def_id); let param_env = cx.tcx.param_env(anon_const.def_id); - print_const(cx, ct.eval(cx.tcx, param_env)) + print_const(cx, ct.normalize(cx.tcx, param_env)) } }; @@ -2082,7 +2082,7 @@ pub(crate) fn clean_middle_ty<'tcx>( ty::Str => Primitive(PrimitiveType::Str), ty::Slice(ty) => Slice(Box::new(clean_middle_ty(bound_ty.rebind(ty), cx, None, None))), ty::Array(ty, mut n) => { - n = n.eval(cx.tcx, ty::ParamEnv::reveal_all()); + n = n.normalize(cx.tcx, ty::ParamEnv::reveal_all()); let n = print_const(cx, n); Array(Box::new(clean_middle_ty(bound_ty.rebind(ty), cx, None, None)), n.into()) } |
