Rename lint

This commit is contained in:
Ryan Levick 2021-06-29 16:05:32 +02:00
parent bbfb8579ff
commit df71a99a0e
3 changed files with 20 additions and 0 deletions

View File

@ -325,6 +325,7 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) {
store.register_renamed("redundant_semicolon", "redundant_semicolons");
store.register_renamed("overlapping_patterns", "overlapping_range_endpoints");
store.register_renamed("safe_packed_borrows", "unaligned_references");
store.register_renamed("disjoint_capture_migration", "rust_2021_incompatible_closure_captures");
// These were moved to tool lints, but rustc still sees them when compiling normally, before
// tool lints are registered, so `check_tool_name_for_backwards_compat` doesn't work. Use

View File

@ -0,0 +1,9 @@
// check-pass
// Ensure that the old name for `rust_2021_incompatible_closure_captures` is still
// accepted by the compiler
#![allow(disjoint_capture_migration)]
//~^ WARN lint `disjoint_capture_migration` has been renamed
fn main() {}

View File

@ -0,0 +1,10 @@
warning: lint `disjoint_capture_migration` has been renamed to `rust_2021_incompatible_closure_captures`
--> $DIR/old_name.rs:6:10
|
LL | #![allow(disjoint_capture_migration)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rust_2021_incompatible_closure_captures`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
warning: 1 warning emitted