diff options
| author | Urgau <urgau@numericable.fr> | 2023-06-08 21:36:20 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2023-07-29 12:20:59 +0200 |
| commit | 507d497cfa014514c5dd904f9d273810e888f757 (patch) | |
| tree | ba53d9556891c394d755cb3e002f8e84a74d6977 /tests | |
| parent | 20a6b571063d33c4b1a786c558f74edbda3012ea (diff) | |
| download | rust-507d497cfa014514c5dd904f9d273810e888f757.tar.gz rust-507d497cfa014514c5dd904f9d273810e888f757.zip | |
Adjust some tests for invalid_reference_casting improvements
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/const-generics/issues/issue-100313.rs | 2 | ||||
| -rw-r--r-- | tests/ui/const-generics/issues/issue-100313.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/const-generics/issues/issue-100313.rs b/tests/ui/const-generics/issues/issue-100313.rs index 9a9d4721c84..9af9b5ca458 100644 --- a/tests/ui/const-generics/issues/issue-100313.rs +++ b/tests/ui/const-generics/issues/issue-100313.rs @@ -9,7 +9,7 @@ impl <const B: &'static bool> T<B> { unsafe { *(B as *const bool as *mut bool) = false; //~^ ERROR evaluation of constant value failed [E0080] - //~| ERROR casting `&T` to `&mut T` is undefined behavior + //~| ERROR assigning to `&T` is undefined behavior } } } diff --git a/tests/ui/const-generics/issues/issue-100313.stderr b/tests/ui/const-generics/issues/issue-100313.stderr index 17e4850bd12..42ad4d61c8e 100644 --- a/tests/ui/const-generics/issues/issue-100313.stderr +++ b/tests/ui/const-generics/issues/issue-100313.stderr @@ -1,8 +1,8 @@ -error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` +error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` --> $DIR/issue-100313.rs:10:13 | LL | *(B as *const bool as *mut bool) = false; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[deny(invalid_reference_casting)]` on by default |
