-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Suggests replacing &mut Vec with &mut [] (ptr_arg) #8388
Comments
@rustbot modify labels +regressoin-from-stable-to-nightly |
This comment has been minimized.
This comment has been minimized.
@rustbod modify labels +regession-from-stable-to-nightly |
@rustbot modify labels +regession-from-stable-to-nightly this time for sure |
This comment has been minimized.
This comment has been minimized.
@rustbot modify labels +regression-from-stable-to-nightly |
This comment has been minimized.
This comment has been minimized.
What label isn't listed as an allowed label in our configuration file, I didn't even knew we had it until now ^^ |
Trait functions will no longer suggest |
Ah, cool, thanks. Closing this as a dupe of #8366 |
Summary
ptr_arg
ought only to trigger on&Vec
, not&mut Vec
. In general, if someone passes&mut SomeObject
, they are likely to be meaning to give access to its methods.Current stable seems to work fine.
Reproducer
I tried this code:
I expected to see this happen:
No complaints.
Instead, this happened:
Needless to say, the suggestion doesn't compile.
Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: