Const generic parameters aren't bounds, even if we end up erroring because of the bound that binds the parameter's type
This commit is contained in:
parent
1cb75dc4a9
commit
e4c9a8cf9b
19 changed files with 146 additions and 128 deletions
|
@ -4,11 +4,11 @@ error[E0284]: type annotations needed
|
|||
LL | bar();
|
||||
| ^^^ cannot infer the value of the const parameter `N` declared on the function `bar`
|
||||
|
|
||||
note: required by a bound in `bar`
|
||||
note: required by a const generic parameter in `bar`
|
||||
--> $DIR/unify_with_nested_expr.rs:12:8
|
||||
|
|
||||
LL | fn bar<const N: usize>()
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `bar`
|
||||
| ^^^^^^^^^^^^^^ required by this const generic parameter in `bar`
|
||||
help: consider specifying the generic argument
|
||||
|
|
||||
LL | bar::<N>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue