diff options
| -rw-r--r-- | compiler/rustc_mir/src/transform/check_consts/ops.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/check-static-immutable-mut-slices.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/const-mut-refs/mut_ref_in_final.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/issue-17718-const-bad-values.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/write_to_mut_ref_dest.mut_refs.stderr (renamed from src/test/ui/consts/projection_qualif.mut_refs.stderr) | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/write_to_mut_ref_dest.stock.stderr (renamed from src/test/ui/consts/projection_qualif.stock.stderr) | 4 | ||||
| -rw-r--r-- | src/test/ui/consts/write_to_static_via_mut_ref.stderr (renamed from src/test/ui/consts/read_from_static_mut_ref.stderr) | 6 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0017.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0388.stderr | 6 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-46604.stderr | 2 |
10 files changed, 18 insertions, 18 deletions
diff --git a/compiler/rustc_mir/src/transform/check_consts/ops.rs b/compiler/rustc_mir/src/transform/check_consts/ops.rs index 23abd522cf0..6e726215177 100644 --- a/compiler/rustc_mir/src/transform/check_consts/ops.rs +++ b/compiler/rustc_mir/src/transform/check_consts/ops.rs @@ -298,7 +298,7 @@ impl NonConstOp for MutBorrow { ccx.tcx.sess, span, E0764, - "{}mutable references are not allowed in final value of {}s", + "{}mutable references are not allowed in the final value of {}s", raw, ccx.const_kind(), ); diff --git a/src/test/ui/check-static-immutable-mut-slices.stderr b/src/test/ui/check-static-immutable-mut-slices.stderr index fcc18cc584c..a32a94c1315 100644 --- a/src/test/ui/check-static-immutable-mut-slices.stderr +++ b/src/test/ui/check-static-immutable-mut-slices.stderr @@ -1,4 +1,4 @@ -error[E0764]: mutable references are not allowed in final value of statics +error[E0764]: mutable references are not allowed in the final value of statics --> $DIR/check-static-immutable-mut-slices.rs:3:37 | LL | static TEST: &'static mut [isize] = &mut []; diff --git a/src/test/ui/consts/const-mut-refs/mut_ref_in_final.stderr b/src/test/ui/consts/const-mut-refs/mut_ref_in_final.stderr index 6d570052aeb..57bf5f7395d 100644 --- a/src/test/ui/consts/const-mut-refs/mut_ref_in_final.stderr +++ b/src/test/ui/consts/const-mut-refs/mut_ref_in_final.stderr @@ -1,4 +1,4 @@ -error[E0764]: mutable references are not allowed in final value of constants +error[E0764]: mutable references are not allowed in the final value of constants --> $DIR/mut_ref_in_final.rs:10:21 | LL | const B: *mut i32 = &mut 4; diff --git a/src/test/ui/consts/issue-17718-const-bad-values.stderr b/src/test/ui/consts/issue-17718-const-bad-values.stderr index 7e02fa4686f..ce60aaa0797 100644 --- a/src/test/ui/consts/issue-17718-const-bad-values.stderr +++ b/src/test/ui/consts/issue-17718-const-bad-values.stderr @@ -1,4 +1,4 @@ -error[E0764]: mutable references are not allowed in final value of constants +error[E0764]: mutable references are not allowed in the final value of constants --> $DIR/issue-17718-const-bad-values.rs:1:34 | LL | const C1: &'static mut [usize] = &mut []; diff --git a/src/test/ui/consts/projection_qualif.mut_refs.stderr b/src/test/ui/consts/write_to_mut_ref_dest.mut_refs.stderr index 0945a23f3b1..3ee50907461 100644 --- a/src/test/ui/consts/projection_qualif.mut_refs.stderr +++ b/src/test/ui/consts/write_to_mut_ref_dest.mut_refs.stderr @@ -1,5 +1,5 @@ error[E0658]: dereferencing raw pointers in constants is unstable - --> $DIR/projection_qualif.rs:11:18 + --> $DIR/write_to_mut_ref_dest.rs:11:18 | LL | unsafe { *b = 5; } | ^^^^^^ diff --git a/src/test/ui/consts/projection_qualif.stock.stderr b/src/test/ui/consts/write_to_mut_ref_dest.stock.stderr index e451898caba..2b6d1d3267b 100644 --- a/src/test/ui/consts/projection_qualif.stock.stderr +++ b/src/test/ui/consts/write_to_mut_ref_dest.stock.stderr @@ -1,5 +1,5 @@ error[E0658]: mutable references are not allowed in constants - --> $DIR/projection_qualif.rs:10:27 + --> $DIR/write_to_mut_ref_dest.rs:10:27 | LL | let b: *mut u32 = &mut a; | ^^^^^^ @@ -8,7 +8,7 @@ LL | let b: *mut u32 = &mut a; = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable error[E0658]: dereferencing raw pointers in constants is unstable - --> $DIR/projection_qualif.rs:11:18 + --> $DIR/write_to_mut_ref_dest.rs:11:18 | LL | unsafe { *b = 5; } | ^^^^^^ diff --git a/src/test/ui/consts/read_from_static_mut_ref.stderr b/src/test/ui/consts/write_to_static_via_mut_ref.stderr index 373220878ec..d19e998d617 100644 --- a/src/test/ui/consts/read_from_static_mut_ref.stderr +++ b/src/test/ui/consts/write_to_static_via_mut_ref.stderr @@ -1,11 +1,11 @@ -error[E0764]: mutable references are not allowed in final value of statics - --> $DIR/read_from_static_mut_ref.rs:4:26 +error[E0764]: mutable references are not allowed in the final value of statics + --> $DIR/write_to_static_via_mut_ref.rs:4:26 | LL | static OH_NO: &mut i32 = &mut 42; | ^^^^^^^ error[E0594]: cannot assign to `*OH_NO`, as `OH_NO` is an immutable static item - --> $DIR/read_from_static_mut_ref.rs:7:5 + --> $DIR/write_to_static_via_mut_ref.rs:7:5 | LL | *OH_NO = 43; | ^^^^^^^^^^^ cannot assign diff --git a/src/test/ui/error-codes/E0017.stderr b/src/test/ui/error-codes/E0017.stderr index 9b094b19757..7d959b6d148 100644 --- a/src/test/ui/error-codes/E0017.stderr +++ b/src/test/ui/error-codes/E0017.stderr @@ -13,7 +13,7 @@ note: `const` item defined here LL | const C: i32 = 2; | ^^^^^^^^^^^^^^^^^ -error[E0764]: mutable references are not allowed in final value of constants +error[E0764]: mutable references are not allowed in the final value of constants --> $DIR/E0017.rs:5:30 | LL | const CR: &'static mut i32 = &mut C; @@ -28,7 +28,7 @@ LL | static STATIC_REF: &'static mut i32 = &mut X; = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable -error[E0764]: mutable references are not allowed in final value of statics +error[E0764]: mutable references are not allowed in the final value of statics --> $DIR/E0017.rs:7:39 | LL | static STATIC_REF: &'static mut i32 = &mut X; @@ -54,13 +54,13 @@ note: `const` item defined here LL | const C: i32 = 2; | ^^^^^^^^^^^^^^^^^ -error[E0764]: mutable references are not allowed in final value of statics +error[E0764]: mutable references are not allowed in the final value of statics --> $DIR/E0017.rs:11:38 | LL | static CONST_REF: &'static mut i32 = &mut C; | ^^^^^^ -error[E0764]: mutable references are not allowed in final value of statics +error[E0764]: mutable references are not allowed in the final value of statics --> $DIR/E0017.rs:13:52 | LL | static STATIC_MUT_REF: &'static mut i32 = unsafe { &mut M }; diff --git a/src/test/ui/error-codes/E0388.stderr b/src/test/ui/error-codes/E0388.stderr index 74d6a92e170..4886a156d2e 100644 --- a/src/test/ui/error-codes/E0388.stderr +++ b/src/test/ui/error-codes/E0388.stderr @@ -13,7 +13,7 @@ note: `const` item defined here LL | const C: i32 = 2; | ^^^^^^^^^^^^^^^^^ -error[E0764]: mutable references are not allowed in final value of constants +error[E0764]: mutable references are not allowed in the final value of constants --> $DIR/E0388.rs:4:30 | LL | const CR: &'static mut i32 = &mut C; @@ -28,7 +28,7 @@ LL | static STATIC_REF: &'static mut i32 = &mut X; = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable -error[E0764]: mutable references are not allowed in final value of statics +error[E0764]: mutable references are not allowed in the final value of statics --> $DIR/E0388.rs:6:39 | LL | static STATIC_REF: &'static mut i32 = &mut X; @@ -54,7 +54,7 @@ note: `const` item defined here LL | const C: i32 = 2; | ^^^^^^^^^^^^^^^^^ -error[E0764]: mutable references are not allowed in final value of statics +error[E0764]: mutable references are not allowed in the final value of statics --> $DIR/E0388.rs:10:38 | LL | static CONST_REF: &'static mut i32 = &mut C; diff --git a/src/test/ui/issues/issue-46604.stderr b/src/test/ui/issues/issue-46604.stderr index 488be0e7731..7faa2d79ba4 100644 --- a/src/test/ui/issues/issue-46604.stderr +++ b/src/test/ui/issues/issue-46604.stderr @@ -1,4 +1,4 @@ -error[E0764]: mutable references are not allowed in final value of statics +error[E0764]: mutable references are not allowed in the final value of statics --> $DIR/issue-46604.rs:1:25 | LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; |
