]> git.lizzy.rs Git - rust.git/blob - src/test/ui/shadowed/shadowed-lifetime.stderr
Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy
[rust.git] / src / test / ui / shadowed / shadowed-lifetime.stderr
1 error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope
2   --> $DIR/shadowed-lifetime.rs:6:25
3    |
4 LL | impl<'a> Foo<'a> {
5    |      -- first declared here
6 LL |     fn shadow_in_method<'a>(&'a self) -> &'a isize {
7    |                         ^^ lifetime `'a` already in scope
8
9 error[E0496]: lifetime name `'b` shadows a lifetime name that is already in scope
10   --> $DIR/shadowed-lifetime.rs:12:20
11    |
12 LL |     fn shadow_in_type<'b>(&'b self) -> &'b isize {
13    |                       -- first declared here
14 LL |         let x: for<'b> fn(&'b isize) = panic!();
15    |                    ^^ lifetime `'b` already in scope
16
17 error: aborting due to 2 previous errors
18
19 For more information about this error, try `rustc --explain E0496`.