File tree 2 files changed +8
-4
lines changed
src/test/ui/const-generics/issues
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
- error: generic parameters must not be used inside of non trivial constant values
1
+ error: generic `Self` types are currently not permitted in anonymous constants
2
2
--> $DIR/issue-62504.rs:19:25
3
3
|
4
4
LL | ArrayHolder([0; Self::SIZE])
5
- | ^^^^^^^^^^ non-trivial anonymous constants must not depend on the parameter `Self`
5
+ | ^^^^^^^^^^
6
6
|
7
- = help: it is currently only allowed to use either `Self` or `{ Self }` as generic constants
7
+ note: not a concrete type
8
+ --> $DIR/issue-62504.rs:17:22
9
+ |
10
+ LL | impl<const X: usize> ArrayHolder<X> {
11
+ | ^^^^^^^^^^^^^^
8
12
9
13
error: aborting due to previous error
10
14
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ impl<const X: usize> ArrayHolder<X> {
18
18
pub const fn new ( ) -> Self {
19
19
ArrayHolder ( [ 0 ; Self :: SIZE ] )
20
20
//[full]~^ ERROR constant expression depends on a generic parameter
21
- //[min]~^^ ERROR generic parameters must not be used inside of non trivial constant values
21
+ //[min]~^^ ERROR generic `Self` types are currently
22
22
}
23
23
}
24
24
You can’t perform that action at this time.
0 commit comments