Issue #53738 seems to have regressed.
I tried this code:
#[deny(single_use_lifetimes)]
#[derive(Eq)]
struct Foo<'a, T> {
/// a reference to the underlying secret data that will be derefed
pub data: &'a mut T,
}
I expected to see this happen: No warning should be produced.
Instead, this happened:
error: lifetime parameter `'a` only used once
--> src/lib.rs:4:12
|
3 | #[derive(Eq)]
| -- ...is used only here
4 | struct Foo<'a, T> {
| ^^ this lifetime...
|
note: lint level defined here
--> src/lib.rs:1:8
|
1 | #[deny(single_use_lifetimes)]
| ^^^^^^^^^^^^^^^^^^^^
Meta
rustc --version --verbose:
rustc 1.42.0 (b8cedc004 2020-03-09)
binary: rustc
commit-hash: b8cedc00407a4c56a3bda1ed605c6fc166655447
commit-date: 2020-03-09
host: x86_64-apple-darwin
release: 1.42.0
LLVM version: 9.0
Issue #53738 seems to have regressed.
I tried this code:
I expected to see this happen: No warning should be produced.
Instead, this happened:
Meta
rustc --version --verbose: