diff options
| author | Ralf Jung <post@ralfj.de> | 2021-05-07 15:11:18 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2021-05-07 15:13:23 +0200 |
| commit | 4dddc3818ec6a618ba85a07ca4fdede56f7f0282 (patch) | |
| tree | 9d8288ed24c717d27524235f1a89cb8f16a92f76 /src/test | |
| parent | ac888e8675182c703c2cd097957878faf88dad94 (diff) | |
| download | rust-4dddc3818ec6a618ba85a07ca4fdede56f7f0282.tar.gz rust-4dddc3818ec6a618ba85a07ca4fdede56f7f0282.zip | |
fix null pointer error messages
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/consts/const-eval/ub-wide-ptr.64bit.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/offset_from_ub.stderr | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/consts/const-eval/ub-wide-ptr.64bit.stderr b/src/test/ui/consts/const-eval/ub-wide-ptr.64bit.stderr index 39c56542762..bb95343a786 100644 --- a/src/test/ui/consts/const-eval/ub-wide-ptr.64bit.stderr +++ b/src/test/ui/consts/const-eval/ub-wide-ptr.64bit.stderr @@ -296,7 +296,7 @@ error[E0080]: could not evaluate static initializer --> $DIR/ub-wide-ptr.rs:135:5 | LL | mem::transmute::<_, &dyn Trait>((&92u8, 0usize)) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ null pointer is not allowed for this operation + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ null pointer is not a valid pointer for this operation error[E0080]: could not evaluate static initializer --> $DIR/ub-wide-ptr.rs:139:5 diff --git a/src/test/ui/consts/offset_from_ub.stderr b/src/test/ui/consts/offset_from_ub.stderr index d5d213f9c79..4254cda2a00 100644 --- a/src/test/ui/consts/offset_from_ub.stderr +++ b/src/test/ui/consts/offset_from_ub.stderr @@ -74,7 +74,7 @@ error: any use of this value will cause an error LL | unsafe { intrinsics::ptr_offset_from(self, origin) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | null pointer is not allowed for this operation + | null pointer is not a valid pointer for this operation | inside `ptr::const_ptr::<impl *const u8>::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `OFFSET_FROM_NULL` at $DIR/offset_from_ub.rs:36:14 | |
