-
Notifications
You must be signed in to change notification settings - Fork 14k
Add correct suggestion for multi-references for self type in method #146305
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
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
ac5c2a2 to
efd1bd0
Compare
|
I'm not sure if it's useful to give a special suggestion for this. |
efd1bd0 to
cd574ab
Compare
|
Let's try this one, I removed second suggestion with Not sure what to do with cases where there is more than two references, but I'd keep it as it just because current suggestion is even worse and not correct in any way |
|
r? compiler |
|
@rustbot author |
cd574ab to
7298174
Compare
|
|
r=me after rebasing & ci green |
|
Forget about rebase but I guess it shouldn't be a problem? |
|
There's an increased risk of soft-conflicts if you have an old base, but given how isolated this change is it should be fine. |
Currently the suggestion for this code
looks like this, which is incorrect and missleading
So this fixes it and make more correct suggestions
Implementation is pretty self-documenting, but if you have suggestions on how to improve this (according to current test, which may be not fully covering all cases, this is works very well) or have some funny edge cases to show, I would appreciate it
r? compiler