]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/collectivity-regression.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / generic-associated-types / collectivity-regression.rs
1 // Regression test from https://github.com/rust-lang/rust/pull/98109
2
3 pub trait Get {
4     type Value<'a>
5     where
6         Self: 'a;
7 }
8
9 fn multiply_at<T>(x: T)
10 where
11     for<'a> T: Get<Value<'a> = ()>,
12 {
13     || {
14         //~^ `T` does not live long enough
15         //
16         // FIXME(#98437). This regressed at some point and
17         // probably should work.
18         let _x = x;
19     };
20 }
21
22 fn main() {}