diff options
| author | Ralf Jung <post@ralfj.de> | 2024-07-27 18:09:50 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-07-27 21:12:54 +0200 |
| commit | f8ebe8d783e20c44508fab32b708f1b9d9a4bf13 (patch) | |
| tree | 27b486aa8fa8400866095e053fa478fe9a7a7d94 /tests/ui/consts/const-eval/raw-pointer-ub.rs | |
| parent | 5b38b149dc5f8a9aaeb06eac6c6f819e0a17caee (diff) | |
| download | rust-f8ebe8d783e20c44508fab32b708f1b9d9a4bf13.tar.gz rust-f8ebe8d783e20c44508fab32b708f1b9d9a4bf13.zip | |
improve dangling/oob errors and make them more uniform
Diffstat (limited to 'tests/ui/consts/const-eval/raw-pointer-ub.rs')
| -rw-r--r-- | tests/ui/consts/const-eval/raw-pointer-ub.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/consts/const-eval/raw-pointer-ub.rs b/tests/ui/consts/const-eval/raw-pointer-ub.rs index 47105de453c..5aced5b1bd6 100644 --- a/tests/ui/consts/const-eval/raw-pointer-ub.rs +++ b/tests/ui/consts/const-eval/raw-pointer-ub.rs @@ -39,7 +39,7 @@ const OOB: () = unsafe { let mem = [0u32; 1]; let ptr = mem.as_ptr().cast::<u64>(); let _val = *ptr; //~ERROR: evaluation of constant value failed - //~^NOTE: size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds + //~^NOTE: expected a pointer to 8 bytes of memory }; fn main() {} |
