Rename cast_ref_to_mut lint to invalid_reference_casting

This commit is contained in:
Urgau 2023-07-06 21:45:24 +02:00
parent a161ab00db
commit 3dbbf23e29
9 changed files with 28 additions and 28 deletions

View file

@ -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;

View file

@ -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