improve fixme
This commit is contained in:
parent
cc19df627e
commit
e06785b676
1 changed files with 6 additions and 3 deletions
|
@ -85,9 +85,12 @@ pub fn equal_up_to_regions(
|
||||||
param_env,
|
param_env,
|
||||||
ty.fold_with(&mut BottomUpFolder {
|
ty.fold_with(&mut BottomUpFolder {
|
||||||
tcx,
|
tcx,
|
||||||
// We just erase all late-bound lifetimes, but this is not fully correct (FIXME):
|
// FIXME: We erase all late-bound lifetimes, but this is not fully correct.
|
||||||
// lifetimes in invariant positions could matter (e.g. through associated types).
|
// If you have a type like `<for<'a> fn(&'a u32) as SomeTrait>::Assoc`,
|
||||||
// We rely on the fact that layout was confirmed to be equal above.
|
// this is not necessarily equivalent to `<fn(&'static u32) as SomeTrait>::Assoc`,
|
||||||
|
// since one may have an `impl SomeTrait for fn(&32)` and
|
||||||
|
// `impl SomeTrait for fn(&'static u32)` at the same time which
|
||||||
|
// specify distinct values for Assoc. (See also #56105)
|
||||||
lt_op: |_| tcx.lifetimes.re_erased,
|
lt_op: |_| tcx.lifetimes.re_erased,
|
||||||
// Leave consts and types unchanged.
|
// Leave consts and types unchanged.
|
||||||
ct_op: |ct| ct,
|
ct_op: |ct| ct,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue