2020-10-01 20:31:05 -05:00
|
|
|
error: generic parameters must not be used inside of non-trivial constant values
|
2020-09-01 07:30:16 -05:00
|
|
|
--> $DIR/self-ty-in-const-1.rs:4:41
|
|
|
|
|
|
|
|
|
LL | fn t1() -> [u8; std::mem::size_of::<Self>()];
|
|
|
|
| ^^^^ non-trivial anonymous constants must not depend on the parameter `Self`
|
|
|
|
|
|
2020-09-14 16:39:43 -05:00
|
|
|
= note: type parameters are currently not permitted in anonymous constants
|
2020-09-01 07:30:16 -05:00
|
|
|
|
|
|
|
error: generic `Self` types are currently not permitted in anonymous constants
|
|
|
|
--> $DIR/self-ty-in-const-1.rs:14:41
|
|
|
|
|
|
|
|
|
LL | fn t3() -> [u8; std::mem::size_of::<Self>()] {}
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
note: not a concrete type
|
2020-09-08 04:37:27 -05:00
|
|
|
--> $DIR/self-ty-in-const-1.rs:13:9
|
2020-09-01 07:30:16 -05:00
|
|
|
|
|
2020-09-08 04:37:27 -05:00
|
|
|
LL | impl<T> Bar<T> {
|
|
|
|
| ^^^^^^
|
2020-09-01 07:30:16 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|