Integer mismatch incorrectly suggests T::from()
as LHS of assignment
#79756
Labels
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried the following code (playground link):
I expected the compiler to recommend using
b.try_into().unwrap()
to convert it into au8
. This seems to have been the case in version 1.37.0. Instead, it produces the following error message on stable, beta, and nightly:The suggestion is incorrect, as the return value of a function call is not assignable.
The text was updated successfully, but these errors were encountered: