]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-32829-2.stderr
Rollup merge of #106962 - compiler-errors:use-sugg-span, r=oli-obk
[rust.git] / tests / ui / consts / issue-32829-2.stderr
1 error[E0015]: cannot call non-const fn `invalid` in constants
2   --> $DIR/issue-32829-2.rs:10:9
3    |
4 LL |         invalid();
5    |         ^^^^^^^^^
6    |
7    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
8
9 error[E0015]: cannot call non-const fn `invalid` in statics
10   --> $DIR/issue-32829-2.rs:32:9
11    |
12 LL |         invalid();
13    |         ^^^^^^^^^
14    |
15    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
16    = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
17
18 error[E0015]: cannot call non-const fn `invalid` in statics
19   --> $DIR/issue-32829-2.rs:54:9
20    |
21 LL |         invalid();
22    |         ^^^^^^^^^
23    |
24    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
25    = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
26
27 error: aborting due to 3 previous errors
28
29 For more information about this error, try `rustc --explain E0015`.