]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/index-out-of-bounds-never-type.stderr
Rollup merge of #101655 - dns2utf8:box_docs, r=dtolnay
[rust.git] / src / test / ui / consts / const-eval / index-out-of-bounds-never-type.stderr
1 error[E0080]: evaluation of `PrintName::<()>::VOID` failed
2   --> $DIR/index-out-of-bounds-never-type.rs:10:61
3    |
4 LL |     const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][x] };
5    |                                                             ^^^^^ index out of bounds: the length is 0 but the index is 0
6
7 note: the above error was encountered while instantiating `fn f::<()>`
8   --> $DIR/index-out-of-bounds-never-type.rs:20:5
9    |
10 LL |     f::<()>();
11    |     ^^^^^^^^^
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0080`.