New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatched type [E0308] offers Intention for fix but does not actual apply fix #2472
Comments
c.c. #1730 |
hm it works little bit differently for me, it replaces As for the desired @vlad20012 what do you think? |
This commit makes the quick-fixes that use BororwMut and AsMut traits to be applicable only for truly mutable expressions. This fixes part of the: intellij-rust#2472
here is a bug-fix for BorrowMut: #2526 |
2526: ANN: Only allow BororwMut and AsMut quick-fixes on mutable expressions r=vlad20012 a=oleg-semenov This commit makes the quick-fixes that use BororwMut and AsMut traits to be applicable only for truly mutable expressions. This fixes part of the: #2472 <!-- Hello and thank you for the pull request! We don't have any strict rules about pull requests, but you might check https://github.com/intellij-rust/intellij-rust/blob/master/CONTRIBUTING.md for some hints! Note that we need an electronic CLA for contributions: https://github.com/intellij-rust/intellij-rust/blob/master/CONTRIBUTING.md#cla After you sign the CLA, please add your name to https://github.com/intellij-rust/intellij-rust/blob/master/CONTRIBUTORS.txt :) --> Co-authored-by: oleg-semenov <olegsa@gmail.com>
This commit makes the quick-fixes that use BororwMut and AsMut traits to be applicable only for truly mutable expressions. This fixes part of the: intellij-rust#2472
I am getting an
mismatched types [E0308] expected '&mut String', found '&String'
error with this code on line 4 (code is from this tutorial)The intention offers to
Convert to &mut String using 'BorrowMut' trait
.Expected behaviour:
The line is changed to
change(&mut s);
.Actual behaviour:
The line is not changed.
Additional information:
IntelliJ IDEA 2018.1.1 (Ultimate Edition)
Build #IU-181.4445.78, built on April 9, 2018
JRE: 1.8.0_162-b12 amd64
JVM: OpenJDK 64-Bit Server VM by Oracle Corporation
Linux 4.15.15-1-ARCH
Rust plugin: Version: 0.2.0.2092-181
The text was updated successfully, but these errors were encountered: