mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
update error codes
This commit is contained in:
parent
49f890bdb3
commit
18fa7789cd
@ -3,8 +3,6 @@ An array without a fixed length was pattern-matched.
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0730
|
||||
#![feature(const_generics)]
|
||||
|
||||
fn is_123<const N: usize>(x: [u32; N]) -> bool {
|
||||
match x {
|
||||
[1, 2, ..] => true, // error: cannot pattern-match on an
|
||||
|
@ -10,6 +10,5 @@ fn foo<T, const N: T>() {} // error!
|
||||
To fix this error, use a concrete type for the const parameter:
|
||||
|
||||
```
|
||||
#![feature(const_generics)]
|
||||
fn foo<T, const N: usize>() {}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user