1
Fork 0

update error codes

This commit is contained in:
Bastian Kauschke 2020-11-17 11:42:53 +01:00
parent 49f890bdb3
commit 18fa7789cd
2 changed files with 0 additions and 3 deletions

View file

@ -3,8 +3,6 @@ An array without a fixed length was pattern-matched.
Erroneous code example: Erroneous code example:
```compile_fail,E0730 ```compile_fail,E0730
#![feature(const_generics)]
fn is_123<const N: usize>(x: [u32; N]) -> bool { fn is_123<const N: usize>(x: [u32; N]) -> bool {
match x { match x {
[1, 2, ..] => true, // error: cannot pattern-match on an [1, 2, ..] => true, // error: cannot pattern-match on an

View file

@ -10,6 +10,5 @@ fn foo<T, const N: T>() {} // error!
To fix this error, use a concrete type for the const parameter: To fix this error, use a concrete type for the const parameter:
``` ```
#![feature(const_generics)]
fn foo<T, const N: usize>() {} fn foo<T, const N: usize>() {}
``` ```