diff options
| author | bors <bors@rust-lang.org> | 2021-03-01 20:52:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-01 20:52:47 +0000 |
| commit | 4f20caa6258d4c74ce6b316fd347e3efe81cf557 (patch) | |
| tree | b02c6087e615f61520af2c778e4d366ff9bfa7d7 /src/test | |
| parent | ccad218e7f909d7dabdb901437fffc151873b8a1 (diff) | |
| parent | 9a86a727c5acdf51a3cf062db552a2391da99276 (diff) | |
| download | rust-4f20caa6258d4c74ce6b316fd347e3efe81cf557.tar.gz rust-4f20caa6258d4c74ce6b316fd347e3efe81cf557.zip | |
Auto merge of #82663 - jyn514:rollup-xh3cb0c, r=jyn514
Rollup of 8 pull requests Successful merges: - #81210 (BTreeMap: correct node size test case for choices of B) - #82360 (config.toml parsing error improvements) - #82428 (Update mdbook) - #82480 (Remove `ENABLE_DOWNLOAD_RUSTC` constant) - #82578 (Add some diagnostic items for Clippy) - #82620 (Apply lint restrictions from renamed lints) - #82635 (Fix typos in rustc_infer::infer::nll_relate) - #82645 (Clarify that SyncOnceCell::set blocks.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/lint/renamed-lints-still-apply.rs | 9 | ||||
| -rw-r--r-- | src/test/ui/lint/renamed-lints-still-apply.stderr | 28 |
2 files changed, 37 insertions, 0 deletions
diff --git a/src/test/ui/lint/renamed-lints-still-apply.rs b/src/test/ui/lint/renamed-lints-still-apply.rs new file mode 100644 index 00000000000..01cd3253672 --- /dev/null +++ b/src/test/ui/lint/renamed-lints-still-apply.rs @@ -0,0 +1,9 @@ +// compile-flags: --crate-type lib +#![deny(single_use_lifetime)] +//~^ WARNING renamed +//~| NOTE `#[warn(renamed_and_removed_lints)]` on by default +//~| NOTE defined here +fn _foo<'a>(_x: &'a u32) {} +//~^ ERROR only used once +//~| NOTE this lifetime +//~| NOTE is used only here diff --git a/src/test/ui/lint/renamed-lints-still-apply.stderr b/src/test/ui/lint/renamed-lints-still-apply.stderr new file mode 100644 index 00000000000..33e5a03266e --- /dev/null +++ b/src/test/ui/lint/renamed-lints-still-apply.stderr @@ -0,0 +1,28 @@ +warning: lint `single_use_lifetime` has been renamed to `single_use_lifetimes` + --> $DIR/renamed-lints-still-apply.rs:2:9 + | +LL | #![deny(single_use_lifetime)] + | ^^^^^^^^^^^^^^^^^^^ help: use the new name: `single_use_lifetimes` + | + = note: `#[warn(renamed_and_removed_lints)]` on by default + +error: lifetime parameter `'a` only used once + --> $DIR/renamed-lints-still-apply.rs:6:9 + | +LL | fn _foo<'a>(_x: &'a u32) {} + | ^^ -- ...is used only here + | | + | this lifetime... + | +note: the lint level is defined here + --> $DIR/renamed-lints-still-apply.rs:2:9 + | +LL | #![deny(single_use_lifetime)] + | ^^^^^^^^^^^^^^^^^^^ +help: elide the single-use lifetime + | +LL | fn _foo(_x: &u32) {} + | -- -- + +error: aborting due to previous error; 1 warning emitted + |
