fix error messages
This commit is contained in:
parent
6e302ad76a
commit
df8adb53c9
4 changed files with 21 additions and 11 deletions
|
|
@ -16,7 +16,7 @@ struct Foo {
|
|||
x: &'_ u32, //~ ERROR
|
||||
}
|
||||
|
||||
struct Bar {
|
||||
enum Bar {
|
||||
Variant(&'_ u32), //~ ERROR
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
error: expected `:`, found `(`
|
||||
--> $DIR/in-struct.rs:20:12
|
||||
|
|
||||
LL | Variant(&'_ u32), //~ ERROR
|
||||
| ^ expected `:`
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/in-struct.rs:16:9
|
||||
|
|
||||
LL | x: &'_ u32, //~ ERROR
|
||||
| ^^ expected lifetime parameter
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/in-struct.rs:20:14
|
||||
|
|
||||
LL | Variant(&'_ u32), //~ ERROR
|
||||
| ^^ expected lifetime parameter
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0106`.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
trait Foo<'a> {}
|
||||
impl<'b: '_> Foo<'b> for i32 {}
|
||||
|
||||
impl<'b: '_> Foo<'b> for i32 {} //~ ERROR `'_` cannot be used here
|
||||
|
||||
impl<T: '_> Foo<'static> for Vec<T> {} //~ ERROR `'_` cannot be used here
|
||||
|
||||
fn main() { }
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
error[E0637]: `'_` cannot be used here
|
||||
--> $DIR/where-clauses.rs:2:10
|
||||
--> $DIR/where-clauses.rs:3:10
|
||||
|
|
||||
LL | impl<'b: '_> Foo<'b> for i32 {}
|
||||
LL | impl<'b: '_> Foo<'b> for i32 {} //~ ERROR `'_` cannot be used here
|
||||
| ^^ `'_` is a reserved lifetime name
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0637]: `'_` cannot be used here
|
||||
--> $DIR/where-clauses.rs:5:9
|
||||
|
|
||||
LL | impl<T: '_> Foo<'static> for Vec<T> {} //~ ERROR `'_` cannot be used here
|
||||
| ^^ `'_` is a reserved lifetime name
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0637`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue