We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4faf535 + ff1459a commit 8a9f3fdCopy full SHA for 8a9f3fd
tests/ui/single-use-lifetime/dedup.rs
@@ -0,0 +1,9 @@
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() {}
tests/ui/single-use-lifetime/dedup.stderr
@@ -0,0 +1,11 @@
+error[E0392]: lifetime parameter `'a` is never used
+ --> $DIR/dedup.rs:6:12
+ |
+LL | struct Foo<'a>;
+ | ^^ unused lifetime parameter
+ = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
+error: aborting due to 1 previous error
10
11
+For more information about this error, try `rustc --explain E0392`.
0 commit comments