File tree Expand file tree Collapse file tree 4 files changed +21
-11
lines changed
src/test/ui/underscore-lifetime Expand file tree Collapse file tree 4 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ struct Foo {
1616 x : & ' _ u32 , //~ ERROR
1717}
1818
19- struct Bar {
19+ enum Bar {
2020 Variant ( & ' _ u32 ) , //~ ERROR
2121}
2222
Original file line number Diff line number Diff line change 1- error: expected `:`, found `(`
2- --> $DIR/in-struct.rs:20:12
3- |
4- LL | Variant(&'_ u32), //~ ERROR
5- | ^ expected `:`
6-
71error[E0106]: missing lifetime specifier
82 --> $DIR/in-struct.rs:16:9
93 |
104LL | x: &'_ u32, //~ ERROR
115 | ^^ expected lifetime parameter
126
7+ error[E0106]: missing lifetime specifier
8+ --> $DIR/in-struct.rs:20:14
9+ |
10+ LL | Variant(&'_ u32), //~ ERROR
11+ | ^^ expected lifetime parameter
12+
1313error: aborting due to 2 previous errors
1414
1515For more information about this error, try `rustc --explain E0106`.
Original file line number Diff line number Diff line change 11trait Foo < ' a > { }
2- impl < ' b : ' _ > Foo < ' b > for i32 { }
2+
3+ impl < ' b : ' _ > Foo < ' b > for i32 { } //~ ERROR `'_` cannot be used here
4+
5+ impl < T : ' _ > Foo < ' static > for Vec < T > { } //~ ERROR `'_` cannot be used here
6+
37fn main ( ) { }
Original file line number Diff line number Diff line change 11error[E0637]: `'_` cannot be used here
2- --> $DIR/where-clauses.rs:2 :10
2+ --> $DIR/where-clauses.rs:3 :10
33 |
4- LL | impl<'b: '_> Foo<'b> for i32 {}
4+ LL | impl<'b: '_> Foo<'b> for i32 {} //~ ERROR `'_` cannot be used here
55 | ^^ `'_` is a reserved lifetime name
66
7- error: aborting due to previous error
7+ error[E0637]: `'_` cannot be used here
8+ --> $DIR/where-clauses.rs:5:9
9+ |
10+ LL | impl<T: '_> Foo<'static> for Vec<T> {} //~ ERROR `'_` cannot be used here
11+ | ^^ `'_` is a reserved lifetime name
12+
13+ error: aborting due to 2 previous errors
814
915For more information about this error, try `rustc --explain E0637`.
You can’t perform that action at this time.
0 commit comments