File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
tests/ui/single-use-lifetime Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ // Check that `unused_lifetimes` lint doesn't duplicate a "parameter is never used" error.
2+ // Fixed in <https://github.com/rust-lang/rust/pull/96833>.
3+ // Issue: <https://github.com/rust-lang/rust/issues/72587>.
4+
5+ #![ warn( unused_lifetimes) ]
6+ struct Foo < ' a > ;
7+ //~^ ERROR parameter `'a` is never used
8+
9+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0392]: lifetime parameter `'a` is never used
2+ --> $DIR/dedup.rs:6:12
3+ |
4+ LL | struct Foo<'a>;
5+ | ^^ unused lifetime parameter
6+ |
7+ = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
8+
9+ error: aborting due to 1 previous error
10+
11+ For more information about this error, try `rustc --explain E0392`.
You can’t perform that action at this time.
0 commit comments