]> git.lizzy.rs Git - rust.git/blob - src/test/ui/in-band-lifetimes/shadow.stderr
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / in-band-lifetimes / shadow.stderr
1 error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
2   --> $DIR/shadow.rs:7:12
3    |
4 LL | impl 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:8:19
11    |
12 LL | impl 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`.