bless tests

This commit is contained in:
Bastian Kauschke 2020-09-13 23:02:43 +02:00
parent c552717e9d
commit 90dd798cf5
2 changed files with 8 additions and 4 deletions

View File

@ -1,10 +1,14 @@
error: generic parameters must not be used inside of non trivial constant values
error: generic `Self` types are currently not permitted in anonymous constants
--> $DIR/issue-62504.rs:19:25
|
LL | ArrayHolder([0; Self::SIZE])
| ^^^^^^^^^^ non-trivial anonymous constants must not depend on the parameter `Self`
| ^^^^^^^^^^
|
= help: it is currently only allowed to use either `Self` or `{ Self }` as generic constants
note: not a concrete type
--> $DIR/issue-62504.rs:17:22
|
LL | impl<const X: usize> ArrayHolder<X> {
| ^^^^^^^^^^^^^^
error: aborting due to previous error

View File

@ -18,7 +18,7 @@ impl<const X: usize> ArrayHolder<X> {
pub const fn new() -> Self {
ArrayHolder([0; Self::SIZE])
//[full]~^ ERROR constant expression depends on a generic parameter
//[min]~^^ ERROR generic parameters must not be used inside of non trivial constant values
//[min]~^^ ERROR generic `Self` types are currently
}
}