Incorrect constraints on const generic parameters #7420
Labels
bug
subsystem::code insight
General label for issues related to code understanding: highlighting, completion, annotation, etc.
Environment
Problem description
The constraints on const generic parameters are incorrectly inferred when only some of the parameters are generic.
Steps to reproduce
The code:
Error: mismatched types [E0308] expected
u8
, foundbool
.The constraint applied to
S
is always that of the preceding type. For example:Error: mismatched types [E0308] expected
usize
, foundu32
.No error occurs if an impl block has either no or all specified generic parameters. E.g.:
No error.
No error.
Extra error
The following error is probably related:
Error: Type arguments must be declared prior to const arguments.
The text was updated successfully, but these errors were encountered: