summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/shadow.stderr
blob: b834e90d8d0795a5dd278293e8d724dc38b54ffa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
  --> $DIR/shadow.rs:4:12
   |
LL | impl<'s> Foo<&'s u8> {
   |      -- first declared here
LL |     fn bar<'s>(&self, x: &'s u8) {}
   |            ^^ lifetime `'s` already in scope

error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
  --> $DIR/shadow.rs:5:19
   |
LL | impl<'s> Foo<&'s u8> {
   |      -- first declared here
LL |     fn bar<'s>(&self, x: &'s u8) {}
LL |     fn baz(x: for<'s> fn(&'s u32)) {}
   |                   ^^ lifetime `'s` already in scope

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0496`.