about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/query.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-09-30 07:33:59 +0000
committerbors <bors@rust-lang.org>2021-09-30 07:33:59 +0000
commit69c1c6a173dcae20c245348f6c7d19074b6109b7 (patch)
tree65a96f64fa157e3f1a4dafaf22d4086e473d816e /compiler/rustc_mir_transform/src/coverage/query.rs
parent30acf6def32a340b4bfce6e1e2638f1b05ac2cd9 (diff)
parent78013f296acd79af84dede7dae1580fd36480c7c (diff)
downloadrust-69c1c6a173dcae20c245348f6c7d19074b6109b7.tar.gz
rust-69c1c6a173dcae20c245348f6c7d19074b6109b7.zip
Auto merge of #89250 - Aaron1011:keep-bound-region-names, r=estebank
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:

https://github.com/rust-lang/rust/blob/63cc2bb3d07d6c726dfcdc5f95cbe5ed4760641a/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.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/query.rs')
0 files changed, 0 insertions, 0 deletions