]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/copy-intrinsic.stderr
Rollup merge of #106873 - BoxyUwU:ty_const_formatting, r=compiler-errors
[rust.git] / tests / ui / consts / copy-intrinsic.stderr
1 error[E0080]: evaluation of constant value failed
2   --> $DIR/copy-intrinsic.rs:27:5
3    |
4 LL |     copy_nonoverlapping(0x100 as *const i32, dangle, 0);
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc5 has size 4, so pointer at offset 40 is out-of-bounds
6
7 error[E0080]: evaluation of constant value failed
8   --> $DIR/copy-intrinsic.rs:34:5
9    |
10 LL |     copy_nonoverlapping(dangle, 0x100 as *mut i32, 0);
11    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc7 has size 4, so pointer at offset 40 is out-of-bounds
12
13 error[E0080]: evaluation of constant value failed
14   --> $DIR/copy-intrinsic.rs:41:5
15    |
16 LL |     copy(&x, &mut y, 1usize << (mem::size_of::<usize>() * 8 - 1));
17    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow computing total size of `copy`
18
19 error[E0080]: evaluation of constant value failed
20   --> $DIR/copy-intrinsic.rs:47:5
21    |
22 LL |     copy_nonoverlapping(&x, &mut y, 1usize << (mem::size_of::<usize>() * 8 - 1));
23    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow computing total size of `copy_nonoverlapping`
24
25 error: aborting due to 4 previous errors
26
27 For more information about this error, try `rustc --explain E0080`.