File tree 1 file changed +6
-3
lines changed
compiler/rustc_mir/src/transform
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(
85
85
param_env,
86
86
ty. fold_with ( & mut BottomUpFolder {
87
87
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)
91
94
lt_op : |_| tcx. lifetimes . re_erased ,
92
95
// Leave consts and types unchanged.
93
96
ct_op : |ct| ct,
You can’t perform that action at this time.
0 commit comments