|
| 1 | +warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes |
| 2 | + --> $DIR/eval_fn_item_in_const_arg.rs:1:12 |
| 3 | + | |
| 4 | +LL | #![feature(generic_const_exprs)] |
| 5 | + | ^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information |
| 8 | + = note: `#[warn(incomplete_features)]` on by default |
| 9 | + |
| 10 | +warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes |
| 11 | + --> $DIR/eval_fn_item_in_const_arg.rs:3:12 |
| 12 | + | |
| 13 | +LL | #![feature(min_generic_const_args)] |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 15 | + | |
| 16 | + = note: see issue #132980 <https://github.com/rust-lang/rust/issues/132980> for more information |
| 17 | + |
| 18 | +error[E0080]: evaluation of `Checked::{constant#0}` failed |
| 19 | + --> $DIR/eval_fn_item_in_const_arg.rs:6:51 |
| 20 | + | |
| 21 | +LL | struct Checked<const N: usize, const M: usize = { N + 1 }>; |
| 22 | + | ^^^^^ using uninitialized data, but this operation requires initialized memory |
| 23 | + |
| 24 | +error: the constant `main` is not of type `usize` |
| 25 | + --> $DIR/eval_fn_item_in_const_arg.rs:10:12 |
| 26 | + | |
| 27 | +LL | let _: Checked<main>; |
| 28 | + | ^^^^^^^^^^^^^ expected `usize`, found fn item |
| 29 | + | |
| 30 | +note: required by a const generic parameter in `Checked` |
| 31 | + --> $DIR/eval_fn_item_in_const_arg.rs:6:16 |
| 32 | + | |
| 33 | +LL | struct Checked<const N: usize, const M: usize = { N + 1 }>; |
| 34 | + | ^^^^^^^^^^^^^^ required by this const generic parameter in `Checked` |
| 35 | + |
| 36 | +error: aborting due to 2 previous errors; 2 warnings emitted |
| 37 | + |
| 38 | +For more information about this error, try `rustc --explain E0080`. |
0 commit comments