]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr
New upstream version 1.50.0+dfsg1
[rustc.git] / src / test / ui / const-generics / min_const_generics / self-ty-in-const-1.stderr
CommitLineData
29967ef6 1error: generic parameters may not be used in const operations
1b1a35ee
XL
2 --> $DIR/self-ty-in-const-1.rs:4:41
3 |
4LL | 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
fc512014 8 = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
1b1a35ee
XL
9
10error: generic `Self` types are currently not permitted in anonymous constants
11 --> $DIR/self-ty-in-const-1.rs:14:41
12 |
13LL | fn t3() -> [u8; std::mem::size_of::<Self>()] {}
14 | ^^^^
15 |
16note: not a concrete type
17 --> $DIR/self-ty-in-const-1.rs:13:9
18 |
19LL | impl<T> Bar<T> {
20 | ^^^^^^
21
22error: aborting due to 2 previous errors
23