rust/tests/ui/lifetimes/shadow.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
692 B
Plaintext
Raw Normal View History

2017-11-16 22:59:45 -08:00
error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
2022-02-09 18:42:32 -08:00
--> $DIR/shadow.rs:4:12
2017-11-16 22:59:45 -08:00
|
2022-02-09 18:42:32 -08:00
LL | impl<'s> Foo<&'s u8> {
| -- first declared here
2019-03-09 15:03:44 +03:00
LL | fn bar<'s>(&self, x: &'s u8) {}
| ^^ lifetime `'s` already in scope
2017-11-16 22:59:45 -08:00
error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
2022-02-09 18:42:32 -08:00
--> $DIR/shadow.rs:5:19
2017-11-16 22:59:45 -08:00
|
2022-02-09 18:42:32 -08:00
LL | impl<'s> Foo<&'s u8> {
| -- first declared here
2019-03-09 15:03:44 +03:00
LL | fn bar<'s>(&self, x: &'s u8) {}
LL | fn baz(x: for<'s> fn(&'s u32)) {}
| ^^ lifetime `'s` already in scope
2017-11-16 22:59:45 -08:00
error: aborting due to 2 previous errors
2018-03-03 15:59:40 +01:00
For more information about this error, try `rustc --explain E0496`.