NLL and closures: higher-ranked lifetime bounds are not enforced in type tests #98693
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
C-bug
Category: This is a bug.
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
P-critical
Critical priority
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Milestone
This code compiles after #95565 although it shouldn't: (playground)
This is similar to #98095 in that we're not taking into account placeholder regions when "promoting" type-tests from the closure to its caller:
rust/compiler/rustc_borrowck/src/region_infer/mod.rs
Line 940 in ddcbba0
@rustbot label T-types regression-from-stable-to-beta C-bug A-NLL I-unsound
The text was updated successfully, but these errors were encountered: