]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-unwrap.stderr
Auto merge of #83572 - pkubaj:patch-1, r=nagisa
[rust.git] / src / test / ui / consts / const-unwrap.stderr
1 error[E0080]: evaluation of constant value failed
2   --> $SRC_DIR/core/src/option.rs:LL:COL
3    |
4 LL |             None => panic!("called `Option::unwrap()` on a `None` value"),
5    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |                     |
7    |                     the evaluated program panicked at 'called `Option::unwrap()` on a `None` value', $DIR/const-unwrap.rs:9:38
8    |                     inside `Option::<i32>::unwrap` at $SRC_DIR/core/src/panic.rs:LL:COL
9    | 
10   ::: $DIR/const-unwrap.rs:9:18
11    |
12 LL | const BAR: i32 = Option::<i32>::None.unwrap();
13    |                  ---------------------------- inside `BAR` at $DIR/const-unwrap.rs:9:18
14    |
15    = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0080`.