]> git.lizzy.rs Git - rust.git/blob - src/test/ui/inline-const/const-expr-generic-err.stderr
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / inline-const / const-expr-generic-err.stderr
1 error[E0080]: evaluation of `foo::<i32>::{constant#0}` failed
2   --> $DIR/const-expr-generic-err.rs:5:13
3    |
4 LL |     const { assert!(std::mem::size_of::<T>() == 0); }
5    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: std::mem::size_of::<T>() == 0', $DIR/const-expr-generic-err.rs:5:13
6    |
7    = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
8
9 note: the above error was encountered while instantiating `fn foo::<i32>`
10   --> $DIR/const-expr-generic-err.rs:13:5
11    |
12 LL |     foo::<i32>();
13    |     ^^^^^^^^^^^^
14
15 error[E0080]: evaluation of `bar::<0>::{constant#0}` failed
16   --> $DIR/const-expr-generic-err.rs:9:13
17    |
18 LL |     const { N - 1 }
19    |             ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
20
21 note: the above error was encountered while instantiating `fn bar::<0>`
22   --> $DIR/const-expr-generic-err.rs:14:5
23    |
24 LL |     bar::<0>();
25    |     ^^^^^^^^^^
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0080`.