Fix error code description
This commit is contained in:
parent
908a6399bc
commit
8f78736fee
1 changed files with 5 additions and 2 deletions
|
|
@ -1645,8 +1645,11 @@ fn main() {
|
|||
E0671: r##"
|
||||
Const parameters cannot depend on type parameters.
|
||||
The following is therefore invalid:
|
||||
```
|
||||
fn const_id<T, const N: T>() -> T {
|
||||
```compile_fail,E0671
|
||||
#![feature(const_generics)]
|
||||
|
||||
fn const_id<T, const N: T>() -> T { // error: const parameter
|
||||
// depends on type parameter
|
||||
N
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue