]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/shadow.stderr
Rollup merge of #93400 - ChayimFriedman2:dont-suggest-using-const-with-bounds-unused...
[rust.git] / src / test / ui / lifetimes / shadow.stderr
1 error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
2   --> $DIR/shadow.rs:4:12
3    |
4 LL | impl<'s> Foo<&'s u8> {
5    |      -- first declared here
6 LL |     fn bar<'s>(&self, x: &'s u8) {}
7    |            ^^ lifetime `'s` already in scope
8
9 error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
10   --> $DIR/shadow.rs:5:19
11    |
12 LL | impl<'s> Foo<&'s u8> {
13    |      -- first declared here
14 LL |     fn bar<'s>(&self, x: &'s u8) {}
15 LL |     fn baz(x: for<'s> fn(&'s u32)) {}
16    |                   ^^ lifetime `'s` already in scope
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0496`.