提交 df71a99a 编写于 作者: R Ryan Levick

Rename lint

上级 bbfb8579
......@@ -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
......
// 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() {}
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册