mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
bless tests
This commit is contained in:
parent
c552717e9d
commit
90dd798cf5
@ -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
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user