This code compiles after #95565 although it shouldn't: (playground)
fn assert_static<T>() where for<'a> T: 'a, {}
fn test<T>() {
|| {
assert_static::<T>();
};
}
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:
|
for ur in self.scc_values.universal_regions_outlived_by(r_scc) { |
@rustbot label T-types regression-from-stable-to-beta C-bug A-NLL I-unsound
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