2020-10-12 22:27:59 +01:00
|
|
|
error: generic parameters may not be used in const operations
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/self-ty-in-const-1.rs:2:41
|
2020-09-01 14:30:16 +02:00
|
|
|
|
|
|
|
|
LL | fn t1() -> [u8; std::mem::size_of::<Self>()];
|
2020-10-11 16:47:45 +01:00
|
|
|
| ^^^^ cannot perform const operation using `Self`
|
2020-09-01 14:30:16 +02:00
|
|
|
|
|
2020-10-12 22:27:59 +01:00
|
|
|
= note: type parameters may not be used in const expressions
|
2021-08-27 18:04:57 +02:00
|
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
2020-09-01 14:30:16 +02:00
|
|
|
|
|
|
|
error: generic `Self` types are currently not permitted in anonymous constants
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/self-ty-in-const-1.rs:12:41
|
2020-09-01 14:30:16 +02:00
|
|
|
|
|
|
|
|
LL | fn t3() -> [u8; std::mem::size_of::<Self>()] {}
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
note: not a concrete type
|
2020-11-17 11:44:21 +01:00
|
|
|
--> $DIR/self-ty-in-const-1.rs:11:9
|
2020-09-01 14:30:16 +02:00
|
|
|
|
|
2020-09-08 11:37:27 +02:00
|
|
|
LL | impl<T> Bar<T> {
|
|
|
|
| ^^^^^^
|
2020-09-01 14:30:16 +02:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|