|
| 1 | +error[E0204]: the trait `ConstParamTy_` cannot be implemented for this type |
| 2 | + --> $DIR/const_param_ty_unchecked_fail.rs:16:24 |
| 3 | + | |
| 4 | +LL | struct Meoww(Miow); |
| 5 | + | ---- this field does not implement `ConstParamTy_` |
| 6 | +... |
| 7 | +LL | impl ConstParamTy_ for Meoww {} |
| 8 | + | ^^^^^ |
| 9 | + |
| 10 | +error[E0204]: the trait `ConstParamTy_` cannot be implemented for this type |
| 11 | + --> $DIR/const_param_ty_unchecked_fail.rs:18:24 |
| 12 | + | |
| 13 | +LL | float: f32, |
| 14 | + | ---------- this field does not implement `ConstParamTy_` |
| 15 | +... |
| 16 | +LL | impl ConstParamTy_ for Float {} |
| 17 | + | ^^^^^ |
| 18 | + |
| 19 | +error: using raw pointers as const generic parameters is forbidden |
| 20 | + --> $DIR/const_param_ty_unchecked_fail.rs:21:24 |
| 21 | + | |
| 22 | +LL | fn something2<const N: *mut u8>() {} |
| 23 | + | ^^^^^^^ |
| 24 | + | |
| 25 | + = note: the only supported types are integers, `bool`, and `char` |
| 26 | + |
| 27 | +error: `f64` is forbidden as the type of a const generic parameter |
| 28 | + --> $DIR/const_param_ty_unchecked_fail.rs:23:23 |
| 29 | + | |
| 30 | +LL | fn something<const N: f64>(a: f64) -> f64 { |
| 31 | + | ^^^ |
| 32 | + | |
| 33 | + = note: the only supported types are integers, `bool`, and `char` |
| 34 | + |
| 35 | +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time |
| 36 | + --> $DIR/const_param_ty_unchecked_fail.rs:27:8 |
| 37 | + | |
| 38 | +LL | fn foo<const N: Vec<[u8]>>() {} |
| 39 | + | ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 40 | + | |
| 41 | + = help: the trait `Sized` is not implemented for `[u8]` |
| 42 | +note: required by an implicit `Sized` bound in `Vec` |
| 43 | + --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL |
| 44 | + |
| 45 | +error: `Vec<[u8]>` is forbidden as the type of a const generic parameter |
| 46 | + --> $DIR/const_param_ty_unchecked_fail.rs:27:17 |
| 47 | + | |
| 48 | +LL | fn foo<const N: Vec<[u8]>>() {} |
| 49 | + | ^^^^^^^^^ |
| 50 | + | |
| 51 | + = note: the only supported types are integers, `bool`, and `char` |
| 52 | + |
| 53 | +error: aborting due to 6 previous errors |
| 54 | + |
| 55 | +Some errors have detailed explanations: E0204, E0277. |
| 56 | +For more information about an error, try `rustc --explain E0204`. |
0 commit comments