File tree Expand file tree Collapse file tree 5 files changed +69
-1
lines changed Expand file tree Collapse file tree 5 files changed +69
-1
lines changed Original file line number Diff line number Diff line change 1+ // Regression test from https://github.com/rust-lang/rust/pull/98109
2+
3+ #![ feature( generic_associated_types) ]
4+
5+ pub trait Get {
6+ type Value < ' a >
7+ where
8+ Self : ' a ;
9+ }
10+
11+ fn multiply_at < T > ( x : T )
12+ where
13+ for < ' a > T : Get < Value < ' a > = ( ) > ,
14+ {
15+ || {
16+ //~^ `T` does not live long enough
17+ //
18+ // FIXME(#98437). This regressed at some point and
19+ // probably should work.
20+ let _x = x;
21+ } ;
22+ }
23+
24+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error: `T` does not live long enough
2+ --> $DIR/collectivity-regression.rs:15:5
3+ |
4+ LL | / || {
5+ LL | |
6+ LL | | //
7+ LL | | // FIXME(#98437). This regressed at some point and
8+ LL | | // probably should work.
9+ LL | | let _x = x;
10+ LL | | };
11+ | |_____^
12+
13+ error: aborting due to previous error
14+
Original file line number Diff line number Diff line change 1919 async move { c. connect ( ) . await }
2020 //~^ ERROR `C` does not live long enough
2121 //
22- // FIXME. This is because we infer at some point a value of
22+ // FIXME(#71723) . This is because we infer at some point a value of
2323 //
2424 // impl Future<Output = <C as Client>::Connection<'_>>
2525 //
Original file line number Diff line number Diff line change 1+ // Regression test from https://github.com/rust-lang/rust/pull/98109
2+
3+ pub fn negotiate < S > ( link : S )
4+ where
5+ for < ' a > & ' a S : ' a ,
6+ {
7+ || {
8+ //~^ ERROR `S` does not live long enough
9+ //
10+ // FIXME(#98437). This regressed at some point and
11+ // probably should work.
12+ let _x = link;
13+ } ;
14+ }
15+
16+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error: `S` does not live long enough
2+ --> $DIR/snocat-regression.rs:7:5
3+ |
4+ LL | / || {
5+ LL | |
6+ LL | | //
7+ LL | | // FIXME(#98437). This regressed at some point and
8+ LL | | // probably should work.
9+ LL | | let _x = link;
10+ LL | | };
11+ | |_____^
12+
13+ error: aborting due to previous error
14+
You can’t perform that action at this time.
0 commit comments