Rename cast_ref_to_mut lint to invalid_reference_casting
This commit is contained in:
parent
a161ab00db
commit
3dbbf23e29
9 changed files with 28 additions and 28 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue