Skip to content

Commit

Permalink
Auto merge of #113422 - Urgau:cast_ref_to_mut-pre-beta, r=Nilstrieb
Browse files Browse the repository at this point in the history
Rename and allow `cast_ref_to_mut` lint

This PR is a small subset of rust-lang/rust#112431, that is the renaming of the lint (`cast_ref_to_mut` -> `invalid_reference_casting`).

BUT also temporarily change the default level of the lint from deny-by-default to allow-by-default until rust-lang/rust#112431 is merged.

r? `@Nilstrieb`
  • Loading branch information
bors committed Jul 29, 2023
2 parents 0c0026e + 50da775 commit 436060f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/renamed_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
("clippy::stutter", "clippy::module_name_repetitions"),
("clippy::to_string_in_display", "clippy::recursive_format_impl"),
("clippy::zero_width_space", "clippy::invisible_characters"),
("clippy::cast_ref_to_mut", "cast_ref_to_mut"),
("clippy::cast_ref_to_mut", "invalid_reference_casting"),
("clippy::clone_double_ref", "suspicious_double_ref_op"),
("clippy::cmp_nan", "invalid_nan_comparisons"),
("clippy::drop_bounds", "drop_bounds"),
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/rename.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::recursive_format_impl)]
#![allow(clippy::invisible_characters)]
#![allow(cast_ref_to_mut)]
#![allow(suspicious_double_ref_op)]
#![allow(invalid_nan_comparisons)]
#![allow(invalid_reference_casting)]
#![allow(drop_bounds)]
#![allow(dropping_copy_types)]
#![allow(dropping_references)]
Expand Down Expand Up @@ -79,7 +79,7 @@
#![warn(clippy::module_name_repetitions)]
#![warn(clippy::recursive_format_impl)]
#![warn(clippy::invisible_characters)]
#![warn(cast_ref_to_mut)]
#![warn(invalid_reference_casting)]
#![warn(suspicious_double_ref_op)]
#![warn(invalid_nan_comparisons)]
#![warn(drop_bounds)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::recursive_format_impl)]
#![allow(clippy::invisible_characters)]
#![allow(cast_ref_to_mut)]
#![allow(suspicious_double_ref_op)]
#![allow(invalid_nan_comparisons)]
#![allow(invalid_reference_casting)]
#![allow(drop_bounds)]
#![allow(dropping_copy_types)]
#![allow(dropping_references)]
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/rename.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ error: lint `clippy::zero_width_space` has been renamed to `clippy::invisible_ch
LL | #![warn(clippy::zero_width_space)]
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::invisible_characters`

error: lint `clippy::cast_ref_to_mut` has been renamed to `cast_ref_to_mut`
error: lint `clippy::cast_ref_to_mut` has been renamed to `invalid_reference_casting`
--> $DIR/rename.rs:82:9
|
LL | #![warn(clippy::cast_ref_to_mut)]
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `cast_ref_to_mut`
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_reference_casting`

error: lint `clippy::clone_double_ref` has been renamed to `suspicious_double_ref_op`
--> $DIR/rename.rs:83:9
Expand Down

0 comments on commit 436060f

Please sign in to comment.