mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
ce2ae62d68
Define the `named_static_lifetimes` lint This lint will replace the existing hard-warning. Replace the named static lifetime hard-warning with the new lint Update the UI tests for the `named_static_lifetimes` lint Remove the direct dependency on `rustc_lint_defs` fix build Signed-off-by: Zhi Qi <qizhi@pingcap.com> use "UNUSED_LIFETIMES" instead Signed-off-by: Zhi Qi <qizhi@pingcap.com> update 1 test and fix typo Signed-off-by: Zhi Qi <qizhi@pingcap.com> update tests Signed-off-by: Zhi Qi <qizhi@pingcap.com> fix tests: add extra blank line Signed-off-by: Zhi Qi <qizhi@pingcap.com>
32 lines
874 B
Plaintext
32 lines
874 B
Plaintext
warning: unnecessary lifetime parameter `'a`
|
|
--> $DIR/regions-static-bound-rpass.rs:6:11
|
|
|
|
|
LL | where 'a: 'static { t }
|
|
| ^^
|
|
|
|
|
= help: you can use the `'static` lifetime directly, in place of `'a`
|
|
note: the lint level is defined here
|
|
--> $DIR/regions-static-bound-rpass.rs:3:9
|
|
|
|
|
LL | #![warn(unused_lifetimes)]
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
warning: unnecessary lifetime parameter `'a`
|
|
--> $DIR/regions-static-bound-rpass.rs:10:11
|
|
|
|
|
LL | where 'a: 'static { t }
|
|
| ^^
|
|
|
|
|
= help: you can use the `'static` lifetime directly, in place of `'a`
|
|
|
|
warning: unnecessary lifetime parameter `'b`
|
|
--> $DIR/regions-static-bound-rpass.rs:14:19
|
|
|
|
|
LL | where 'a: 'b, 'b: 'static { t }
|
|
| ^^
|
|
|
|
|
= help: you can use the `'static` lifetime directly, in place of `'b`
|
|
|
|
warning: 3 warnings emitted
|
|
|