Skip to content

Commit

Permalink
Rename cast_ref_to_mut lint to invalid_reference_casting
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Jul 13, 2023
1 parent 75d6481 commit 24b9f82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/fail/both_borrows/shr_frozen_violation1.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/fail/modifying_constants.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 24b9f82

Please sign in to comment.