add more to the ERROR messages
This commit is contained in:
parent
df8adb53c9
commit
c294ec640b
9 changed files with 27 additions and 27 deletions
|
@ -10,36 +10,36 @@ struct IceCube<'a> {
|
|||
}
|
||||
|
||||
impl<'_> IceCube<'_> {}
|
||||
//[Rust2015]~^ ERROR
|
||||
//[Rust2015]~| ERROR
|
||||
//[Rust2018]~^^^ ERROR
|
||||
//[Rust2015]~^ ERROR `'_` cannot be used here
|
||||
//[Rust2015]~| ERROR missing lifetime specifier
|
||||
//[Rust2018]~^^^ ERROR `'_` cannot be used here
|
||||
|
||||
struct Struct<'_> {
|
||||
//[Rust2015]~^ ERROR
|
||||
//[Rust2018]~^^ ERROR
|
||||
//[Rust2015]~^ ERROR `'_` cannot be used here
|
||||
//[Rust2018]~^^ ERROR `'_` cannot be used here
|
||||
v: Vec<&'static char>
|
||||
}
|
||||
|
||||
enum Enum<'_> {
|
||||
//[Rust2015]~^ ERROR
|
||||
//[Rust2018]~^^ ERROR
|
||||
//[Rust2015]~^ ERROR `'_` cannot be used here
|
||||
//[Rust2018]~^^ ERROR `'_` cannot be used here
|
||||
Variant
|
||||
}
|
||||
|
||||
union Union<'_> {
|
||||
//[Rust2015]~^ ERROR
|
||||
//[Rust2018]~^^ ERROR
|
||||
//[Rust2015]~^ ERROR `'_` cannot be used here
|
||||
//[Rust2018]~^^ ERROR `'_` cannot be used here
|
||||
a: u32
|
||||
}
|
||||
|
||||
trait Trait<'_> {
|
||||
//[Rust2015]~^ ERROR
|
||||
//[Rust2018]~^^ ERROR
|
||||
//[Rust2015]~^ ERROR `'_` cannot be used here
|
||||
//[Rust2018]~^^ ERROR `'_` cannot be used here
|
||||
}
|
||||
|
||||
fn foo<'_>() {
|
||||
//[Rust2015]~^ ERROR
|
||||
//[Rust2018]~^^ ERROR
|
||||
//[Rust2015]~^ ERROR `'_` cannot be used here
|
||||
//[Rust2018]~^^ ERROR `'_` cannot be used here
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
|
||||
use std::fmt::Debug;
|
||||
|
||||
fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } } //~ ERROR
|
||||
fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } } //~ ERROR missing lifetime specifier
|
||||
|
||||
fn main() { }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/in-fn-return-illegal.rs:15:30
|
||||
|
|
||||
LL | fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } } //~ ERROR
|
||||
LL | fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } } //~ ERROR missing lifetime specifier
|
||||
| ^^ expected lifetime parameter
|
||||
|
|
||||
= help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `x` or `y`
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
use std::fmt::Debug;
|
||||
|
||||
struct Foo {
|
||||
x: &'_ u32, //~ ERROR
|
||||
x: &'_ u32, //~ ERROR missing lifetime specifier
|
||||
}
|
||||
|
||||
enum Bar {
|
||||
Variant(&'_ u32), //~ ERROR
|
||||
Variant(&'_ u32), //~ ERROR missing lifetime specifier
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/in-struct.rs:16:9
|
||||
|
|
||||
LL | x: &'_ u32, //~ ERROR
|
||||
LL | x: &'_ u32, //~ ERROR missing lifetime specifier
|
||||
| ^^ expected lifetime parameter
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/in-struct.rs:20:14
|
||||
|
|
||||
LL | Variant(&'_ u32), //~ ERROR
|
||||
LL | Variant(&'_ u32), //~ ERROR missing lifetime specifier
|
||||
| ^^ expected lifetime parameter
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
@ -11,8 +11,8 @@ struct Foo<T> {
|
|||
impl<T> Foo<T>
|
||||
where
|
||||
T: WithType<&u32>
|
||||
//[rust2015]~^ ERROR
|
||||
//[rust2018]~^^ ERROR
|
||||
//[rust2015]~^ ERROR `&` without an explicit lifetime name cannot be used here
|
||||
//[rust2018]~^^ ERROR `&` without an explicit lifetime name cannot be used here
|
||||
{ }
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -11,8 +11,8 @@ struct Foo<T> {
|
|||
impl<T> Foo<T>
|
||||
where
|
||||
T: WithRegion<'_>
|
||||
//[rust2015]~^ ERROR
|
||||
//[rust2018]~^^ ERROR
|
||||
//[rust2015]~^ ERROR `'_` cannot be used here
|
||||
//[rust2018]~^^ ERROR `'_` cannot be used here
|
||||
{ }
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -9,8 +9,8 @@ trait Foo { }
|
|||
impl<T> Foo for Vec<T>
|
||||
where
|
||||
T: WithType<&u32>
|
||||
//[rust2015]~^ ERROR
|
||||
//[rust2018]~^^ ERROR
|
||||
//[rust2015]~^ ERROR `&` without an explicit lifetime name cannot be used here
|
||||
//[rust2018]~^^ ERROR `&` without an explicit lifetime name cannot be used here
|
||||
{ }
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -9,8 +9,8 @@ trait Foo { }
|
|||
impl<T> Foo for Vec<T>
|
||||
where
|
||||
T: WithRegion<'_>
|
||||
//[rust2015]~^ ERROR
|
||||
//[rust2018]~^^ ERROR
|
||||
//[rust2015]~^ ERROR `'_` cannot be used here
|
||||
//[rust2018]~^^ ERROR `'_` cannot be used here
|
||||
{ }
|
||||
|
||||
fn main() {}
|
||||
|
|
Loading…
Add table
Reference in a new issue