diff options
| author | Jeffrey Griffin <git@geogriffin.com> | 2021-02-05 08:49:59 -0800 |
|---|---|---|
| committer | Jeffrey Griffin <git@geogriffin.com> | 2021-02-05 08:49:59 -0800 |
| commit | af28c2e64df82744cd627b0c305eb2e4d4d260ca (patch) | |
| tree | 15881c6c62a8353af258ac79be998d4e65427f1b /src | |
| parent | ff315e34e8cfb9766b10f7740c8720e56f6d3475 (diff) | |
| download | rust-af28c2e64df82744cd627b0c305eb2e4d4d260ca.tar.gz rust-af28c2e64df82744cd627b0c305eb2e4d4d260ca.zip | |
fix ui tests referencing pointer-to-integer cast error message
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/consts/const-eval/const_raw_ptr_ops2.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/issue-51559.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/issue-52432.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/miri_unleashed/ptr_arith.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/miri_unleashed/ptr_arith.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/ptr_comparisons.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/consts/ptr_comparisons.stderr | 4 |
7 files changed, 9 insertions, 9 deletions
diff --git a/src/test/ui/consts/const-eval/const_raw_ptr_ops2.stderr b/src/test/ui/consts/const-eval/const_raw_ptr_ops2.stderr index f207674ac1d..df8b33a0898 100644 --- a/src/test/ui/consts/const-eval/const_raw_ptr_ops2.stderr +++ b/src/test/ui/consts/const-eval/const_raw_ptr_ops2.stderr @@ -4,7 +4,7 @@ error: any use of this value will cause an error LL | const Y2: usize = unsafe { &1 as *const i32 as usize + 1 }; | ---------------------------^^^^^^^^^^^^^^^^^^^^^^^^^------- | | - | "pointer-to-integer cast" needs an rfc before being allowed inside constants + | cannot cast pointer to integer because it was not created by cast from integer | = note: `#[deny(const_err)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/consts/issue-51559.stderr b/src/test/ui/consts/issue-51559.stderr index fbb40c890dd..d571eb54963 100644 --- a/src/test/ui/consts/issue-51559.stderr +++ b/src/test/ui/consts/issue-51559.stderr @@ -4,7 +4,7 @@ error: any use of this value will cause an error LL | pub const FOO: usize = unsafe { BAR as usize }; | --------------------------------^^^^^^^^^^^^--- | | - | "pointer-to-integer cast" needs an rfc before being allowed inside constants + | cannot cast pointer to integer because it was not created by cast from integer | = note: `#[deny(const_err)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/consts/issue-52432.stderr b/src/test/ui/consts/issue-52432.stderr index e9539d24118..29998950552 100644 --- a/src/test/ui/consts/issue-52432.stderr +++ b/src/test/ui/consts/issue-52432.stderr @@ -20,7 +20,7 @@ error[E0080]: evaluation of constant value failed --> $DIR/issue-52432.rs:7:10 | LL | [(); &(static || {}) as *const _ as usize]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "pointer-to-integer cast" needs an rfc before being allowed inside constants + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot cast pointer to integer because it was not created by cast from integer error: aborting due to 4 previous errors diff --git a/src/test/ui/consts/miri_unleashed/ptr_arith.rs b/src/test/ui/consts/miri_unleashed/ptr_arith.rs index 65fc49c0b27..aae6d837204 100644 --- a/src/test/ui/consts/miri_unleashed/ptr_arith.rs +++ b/src/test/ui/consts/miri_unleashed/ptr_arith.rs @@ -15,7 +15,7 @@ static INT_PTR_ARITH: () = unsafe { let x: usize = std::mem::transmute(&0); let _v = x + 0; //~^ ERROR could not evaluate static initializer - //~| NOTE pointer-to-integer cast + //~| NOTE cannot cast pointer to integer }; fn main() {} diff --git a/src/test/ui/consts/miri_unleashed/ptr_arith.stderr b/src/test/ui/consts/miri_unleashed/ptr_arith.stderr index d782a3633b2..8ac4aa87f64 100644 --- a/src/test/ui/consts/miri_unleashed/ptr_arith.stderr +++ b/src/test/ui/consts/miri_unleashed/ptr_arith.stderr @@ -8,7 +8,7 @@ error[E0080]: could not evaluate static initializer --> $DIR/ptr_arith.rs:16:14 | LL | let _v = x + 0; - | ^^^^^ "pointer-to-integer cast" needs an rfc before being allowed inside constants + | ^^^^^ cannot cast pointer to integer because it was not created by cast from integer warning: skipping const checks | diff --git a/src/test/ui/consts/ptr_comparisons.rs b/src/test/ui/consts/ptr_comparisons.rs index 0570d817fcc..0fbe55f972e 100644 --- a/src/test/ui/consts/ptr_comparisons.rs +++ b/src/test/ui/consts/ptr_comparisons.rs @@ -71,14 +71,14 @@ const _: *const u8 = const _: usize = unsafe { std::mem::transmute::<*const usize, usize>(FOO) + 4 }; //~^ ERROR any use of this value will cause an error -//~| NOTE "pointer-to-integer cast" needs an rfc +//~| NOTE cannot cast pointer to integer //~| NOTE //~| WARN this was previously accepted by the compiler but is being phased out //~| NOTE const _: usize = unsafe { *std::mem::transmute::<&&usize, &usize>(&FOO) + 4 }; //~^ ERROR any use of this value will cause an error -//~| NOTE "pointer-to-integer cast" needs an rfc +//~| NOTE cannot cast pointer to integer //~| NOTE //~| WARN this was previously accepted by the compiler but is being phased out //~| NOTE diff --git a/src/test/ui/consts/ptr_comparisons.stderr b/src/test/ui/consts/ptr_comparisons.stderr index c6c13e54137..9ec009c55c4 100644 --- a/src/test/ui/consts/ptr_comparisons.stderr +++ b/src/test/ui/consts/ptr_comparisons.stderr @@ -36,7 +36,7 @@ error: any use of this value will cause an error LL | const _: usize = unsafe { std::mem::transmute::<*const usize, usize>(FOO) + 4 }; | --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--- | | - | "pointer-to-integer cast" needs an rfc before being allowed inside constants + | cannot cast pointer to integer because it was not created by cast from integer | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> @@ -47,7 +47,7 @@ error: any use of this value will cause an error LL | const _: usize = unsafe { *std::mem::transmute::<&&usize, &usize>(&FOO) + 4 }; | --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--- | | - | "pointer-to-integer cast" needs an rfc before being allowed inside constants + | cannot cast pointer to integer because it was not created by cast from integer | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> |
