You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has a type error, of course, but the error message is not the most helpful. At least to me it seems to imply that the compiler found a literal type parameter (ie. in this case T or U) but expects another type parameter, when in actuality it's about values of those types. The note helps a bit though.
error[E0308]: mismatched types
--> src/main.rs:4:12
|
4 | bar(t, u);
| ^ expected type parameter, found a different type parameter
|
= note: expected type `T`
found type `U`
The text was updated successfully, but these errors were encountered:
Consider the following short snippet (playground):
It has a type error, of course, but the error message is not the most helpful. At least to me it seems to imply that the compiler found a literal type parameter (ie. in this case
T
orU
) but expects another type parameter, when in actuality it's about values of those types. The note helps a bit though.The text was updated successfully, but these errors were encountered: