File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
compiler/rustc_mir/src/transform Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,12 @@ pub fn equal_up_to_regions(
8585 param_env,
8686 ty. fold_with ( & mut BottomUpFolder {
8787 tcx,
88- // We just erase all late-bound lifetimes, but this is not fully correct (FIXME):
89- // lifetimes in invariant positions could matter (e.g. through associated types).
90- // We rely on the fact that layout was confirmed to be equal above.
88+ // FIXME: We erase all late-bound lifetimes, but this is not fully correct.
89+ // If you have a type like `<for<'a> fn(&'a u32) as SomeTrait>::Assoc`,
90+ // this is not necessarily equivalent to `<fn(&'static u32) as SomeTrait>::Assoc`,
91+ // since one may have an `impl SomeTrait for fn(&32)` and
92+ // `impl SomeTrait for fn(&'static u32)` at the same time which
93+ // specify distinct values for Assoc. (See also #56105)
9194 lt_op : |_| tcx. lifetimes . re_erased ,
9295 // Leave consts and types unchanged.
9396 ct_op : |ct| ct,
You can’t perform that action at this time.
0 commit comments