File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/test/ui/const-generics/issues Expand file tree Collapse file tree 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
22 --> $DIR/issue-62504.rs:19:25
33 |
44LL | ArrayHolder([0; Self::SIZE])
5- | ^^^^^^^^^^ non-trivial anonymous constants must not depend on the parameter `Self`
5+ | ^^^^^^^^^^
66 |
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+ | ^^^^^^^^^^^^^^
812
913error: aborting due to previous error
1014
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ impl<const X: usize> ArrayHolder<X> {
1818 pub const fn new ( ) -> Self {
1919 ArrayHolder ( [ 0 ; Self :: SIZE ] )
2020 //[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
2222 }
2323}
2424
You can’t perform that action at this time.
0 commit comments