Skip to content

Commit 2451ef5

Browse files
committed
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 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`
2 parents cc7d560 + 24b9f82 commit 2451ef5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/fail/both_borrows/shr_frozen_violation1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@revisions: stack tree
22
//@[tree]compile-flags: -Zmiri-tree-borrows
33

4-
#![allow(cast_ref_to_mut)]
4+
#![allow(invalid_reference_casting)]
55

66
fn foo(x: &mut i32) -> i32 {
77
*x = 5;

tests/fail/modifying_constants.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This should fail even without validation/SB
22
//@compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
33

4-
#![allow(cast_ref_to_mut)]
4+
#![allow(invalid_reference_casting)]
55

66
fn main() {
77
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

0 commit comments

Comments
 (0)