]>
Commit | Line | Data |
---|---|---|
29967ef6 | 1 | error: generic parameters may not be used in const operations |
5869c6ff | 2 | --> $DIR/self-ty-in-const-1.rs:2:41 |
1b1a35ee XL |
3 | | |
4 | LL | fn t1() -> [u8; std::mem::size_of::<Self>()]; | |
29967ef6 | 5 | | ^^^^ cannot perform const operation using `Self` |
1b1a35ee | 6 | | |
29967ef6 | 7 | = note: type parameters may not be used in const expressions |
94222f64 | 8 | = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions |
1b1a35ee XL |
9 | |
10 | error: generic `Self` types are currently not permitted in anonymous constants | |
5869c6ff | 11 | --> $DIR/self-ty-in-const-1.rs:12:41 |
1b1a35ee XL |
12 | | |
13 | LL | fn t3() -> [u8; std::mem::size_of::<Self>()] {} | |
14 | | ^^^^ | |
15 | | | |
16 | note: not a concrete type | |
5869c6ff | 17 | --> $DIR/self-ty-in-const-1.rs:11:9 |
1b1a35ee XL |
18 | | |
19 | LL | impl<T> Bar<T> { | |
20 | | ^^^^^^ | |
21 | ||
22 | error: aborting due to 2 previous errors | |
23 |