about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-29 07:48:44 +0000
committerbors <bors@rust-lang.org>2023-07-29 07:48:44 +0000
commit04411507bef1d2db441acdc1d89268f0cbaaccbc (patch)
treed9d29b76ce4452b0dc2758c51069cac0ebe68608 /src/tools/miri/tests/fail
parent2dc661037d059bff1487b76ca949ced7b3cd46c9 (diff)
parentf25ad54a4d0febbcb2b7e951835228b7b2320b49 (diff)
downloadrust-04411507bef1d2db441acdc1d89268f0cbaaccbc.tar.gz
rust-04411507bef1d2db441acdc1d89268f0cbaaccbc.zip
Auto merge of #113422 - Urgau:cast_ref_to_mut-pre-beta, r=Nilstrieb
Rename and allow `cast_ref_to_mut` lint

This PR is a small subset of https://github.com/rust-lang/rust/pull/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 https://github.com/rust-lang/rust/pull/112431 is merged.

r? `@Nilstrieb`
Diffstat (limited to 'src/tools/miri/tests/fail')
-rw-r--r--src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.rs2
-rw-r--r--src/tools/miri/tests/fail/modifying_constants.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.rs b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.rs
index 1edd7748cde..0c7f4b89711 100644
--- a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.rs
+++ b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.rs
@@ -1,7 +1,7 @@
 //@revisions: stack tree
 //@[tree]compile-flags: -Zmiri-tree-borrows
 
-#![allow(cast_ref_to_mut)]
+#![allow(invalid_reference_casting)]
 
 fn foo(x: &mut i32) -> i32 {
     *x = 5;
diff --git a/src/tools/miri/tests/fail/modifying_constants.rs b/src/tools/miri/tests/fail/modifying_constants.rs
index 40ba31dad8f..0d1bd7929b5 100644
--- a/src/tools/miri/tests/fail/modifying_constants.rs
+++ b/src/tools/miri/tests/fail/modifying_constants.rs
@@ -1,7 +1,7 @@
 // This should fail even without validation/SB
 //@compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
 
-#![allow(cast_ref_to_mut)]
+#![allow(invalid_reference_casting)]
 
 fn main() {
     let x = &1; // the `&1` is promoted to a constant, but it used to be that only the pointer is marked static, not the pointee