rust/src/test/ui/hygiene/duplicate_lifetimes.stderr
Matthew Jasper 3dca17e62d Disallow duplicate lifetime parameters with legacy hygiene
They were resolved with modern hygiene, making this just a strange way
to shadow lifetimes.
2019-07-28 13:33:51 +01:00

28 lines
667 B
Plaintext

error[E0263]: lifetime name `'a` declared twice in the same scope
--> $DIR/duplicate_lifetimes.rs:8:14
|
LL | fn g<$a, 'a>() {}
| ^^ declared twice
...
LL | m!('a);
| -------
| | |
| | previous declaration here
| in this macro invocation
error[E0263]: lifetime name `'a` declared twice in the same scope
--> $DIR/duplicate_lifetimes.rs:13:14
|
LL | fn h<$a, 'a>() {}
| ^^ declared twice
...
LL | n!('a);
| -------
| | |
| | previous declaration here
| in this macro invocation
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0263`.