Closed
Description
Description
Due to macro's its sometimes not easy to adapt a warning.
This code creates the warning that the lifetime can be replaced directly:
pub fn foo<'a>(_s: &'a str) where 'a: 'static { }
warning: unnecessary lifetime parameter `'a`
--> src/lib.rs:2:37
|
2 | pub fn foo<'a>(_s: &'a str) where 'a: 'static { }
| ^^
|
= help: you can use the `'static` lifetime directly, in place of `'a`
warning: `playground` (lib) generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 1.19s
However there does not seem to be a tag that allows us to silence it.
Version
rustc 1.63.0-nightly (c52b9c10b 2022-05-16)
binary: rustc
commit-hash: c52b9c10bfb5164015eb977ff498e0597ae63eb1
commit-date: 2022-05-16
host: x86_64-unknown-linux-gnu
release: 1.63.0-nightly
LLVM version: 14.0.4
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
No labels