]>
Commit | Line | Data |
---|---|---|
5869c6ff XL |
1 | error: generic parameters may not be used in const operations |
2 | --> $DIR/issue-70453-generics-in-discr-ice.rs:10:32 | |
f9f354fc XL |
3 | | |
4 | LL | Some = std::mem::size_of::<T>(), | |
5869c6ff | 5 | | ^ cannot perform const operation using `T` |
f9f354fc | 6 | | |
5869c6ff | 7 | = note: type parameters may not be used in const expressions |
94222f64 | 8 | = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions |
f9f354fc XL |
9 | |
10 | error[E0392]: parameter `T` is never used | |
11 | --> $DIR/issue-70453-generics-in-discr-ice.rs:7:20 | |
12 | | | |
13 | LL | enum MyWeirdOption<T> { | |
14 | | ^ unused parameter | |
15 | | | |
1b1a35ee | 16 | = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` |
17df50a5 | 17 | = help: if you intended `T` to be a const parameter, use `const T: usize` instead |
f9f354fc XL |
18 | |
19 | error: aborting due to 2 previous errors | |
20 | ||
21 | For more information about this error, try `rustc --explain E0392`. |