1
Fork 0

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:
Oli Scherer 2024-06-19 08:25:58 +00:00
parent 1cb75dc4a9
commit e4c9a8cf9b
19 changed files with 146 additions and 128 deletions

View file

@ -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>();