rust/src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr

24 lines
838 B
Plaintext
Raw Normal View History

2020-10-12 16:27:59 -05:00
error: generic parameters may not be used in const operations
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>()];
| ^^^^ cannot perform const operation using `Self`
2020-09-01 07:30:16 -05:00
|
2020-10-12 16:27:59 -05:00
= note: type parameters may not be used in const expressions
2020-11-24 05:05:55 -06:00
= help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
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