We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
with_reveal_all_normalized
1 parent de68911 commit ee59531Copy full SHA for ee59531
compiler/rustc_ty_utils/src/layout.rs
@@ -36,6 +36,9 @@ fn layout_of<'tcx>(
36
let (param_env, ty) = query.into_parts();
37
debug!(?ty);
38
39
+ // Optimization: We convert to RevealAll and convert opaque types in the where bounds
40
+ // to their hidden types. This reduces overall uncached invocations of `layout_of` and
41
+ // is thus a small performance improvement.
42
let param_env = param_env.with_reveal_all_normalized(tcx);
43
let unnormalized_ty = ty;
44
0 commit comments