Explain with_reveal_all_normalized
usage
This commit is contained in:
parent
de68911f4a
commit
ee59531dfc
1 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,9 @@ fn layout_of<'tcx>(
|
||||||
let (param_env, ty) = query.into_parts();
|
let (param_env, ty) = query.into_parts();
|
||||||
debug!(?ty);
|
debug!(?ty);
|
||||||
|
|
||||||
|
// Optimization: We convert to RevealAll and convert opaque types in the where bounds
|
||||||
|
// to their hidden types. This reduces overall uncached invocations of `layout_of` and
|
||||||
|
// is thus a small performance improvement.
|
||||||
let param_env = param_env.with_reveal_all_normalized(tcx);
|
let param_env = param_env.with_reveal_all_normalized(tcx);
|
||||||
let unnormalized_ty = ty;
|
let unnormalized_ty = ty;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue