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