rust/src/test/ui/in-band-lifetimes/shadow.stderr
Guillaume Gomez 2e104a77cf update tests
2018-03-14 00:53:24 +01:00

21 lines
794 B
Plaintext

error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
--> $DIR/shadow.rs:17:12
|
LL | impl Foo<&'s u8> {
| -- first declared here
LL | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name
| ^^ lifetime 's already in scope
error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
--> $DIR/shadow.rs:18:19
|
LL | impl Foo<&'s u8> {
| -- first declared here
LL | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name
LL | fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name
| ^^ lifetime 's already in scope
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0496`.