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
I expected to see this happen: Suggestion of *n = ..., the correct code would be
fnt(n:&muti32){*n = "42".parse().unwrap();}
Instead, this happened: It did not look at mutable deref value and directly show the suggestion
error[E0277]: the trait bound `&mut i32: std::str::FromStr` is not satisfied
--> src/lib.rs:2:14
|
2 | n = "42".parse().unwrap();
| ^^^^^ the trait `std::str::FromStr` is not implemented for `&mut i32`
|
= help: the following implementations were found:
<i32 as std::str::FromStr>
Not sure why but I miss * quite often.
Meta
rustc --version --verbose:
1.42.0
The text was updated successfully, but these errors were encountered:
I tried this code:
I expected to see this happen: Suggestion of
*n = ...
, the correct code would beInstead, this happened: It did not look at mutable deref value and directly show the suggestion
Not sure why but I miss
*
quite often.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: