Rename lint
This commit is contained in:
parent
bbfb8579ff
commit
df71a99a0e
3 changed files with 20 additions and 0 deletions
|
@ -325,6 +325,7 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) {
|
||||||
store.register_renamed("redundant_semicolon", "redundant_semicolons");
|
store.register_renamed("redundant_semicolon", "redundant_semicolons");
|
||||||
store.register_renamed("overlapping_patterns", "overlapping_range_endpoints");
|
store.register_renamed("overlapping_patterns", "overlapping_range_endpoints");
|
||||||
store.register_renamed("safe_packed_borrows", "unaligned_references");
|
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
|
// 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
|
// tool lints are registered, so `check_tool_name_for_backwards_compat` doesn't work. Use
|
||||||
|
|
|
@ -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() {}
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue