rust/src/test/ui/lub-glb
Aaron Hill 78013f296a
Don't anonymize bound region names during typeck
Once this anonymization has performed, we have no
way of recovering the original names during NLL
borrow checking. Keeping the original names allows
error messages in full NLL mode to contain the original
bound region names.

As a result, the typeck results may contain types that
differ only in the names used for their bound regions. However,
anonimization of bound regions does not guarantee that
all distinct types are unqual (e.g. not subtypes of each other).
For example, `for<'a> fn(&'a u32, &'a u32)` and
`for<'b, 'c> fn(&'b u32, &'c u32)` are subtypes of each other,
as explained here:

63cc2bb3d0/compiler/rustc_infer/src/infer/nll_relate/mod.rs (L682-L690)

Therefore, any code handling types with higher-ranked regions already
needs to handle the case where two distinct `Ty`s are 'actually'
equal.
2021-09-25 13:04:00 -05:00
..
old-lub-glb-hr-eq.rs
old-lub-glb-hr-noteq1.nll.stderr Don't anonymize bound region names during typeck 2021-09-25 13:04:00 -05:00
old-lub-glb-hr-noteq1.rs
old-lub-glb-hr-noteq1.stderr
old-lub-glb-hr-noteq2.rs
old-lub-glb-hr-noteq2.stderr
old-lub-glb-object.nll.stderr Don't anonymize bound region names during typeck 2021-09-25 13:04:00 -05:00
old-lub-glb-object.rs
old-lub-glb-object.stderr