borrowck: clarify an E0502 label for &self.field vs mutable self#155116
Open
ozankenangungor wants to merge 1 commit intorust-lang:mainfrom
Open
borrowck: clarify an E0502 label for &self.field vs mutable self#155116ozankenangungor wants to merge 1 commit intorust-lang:mainfrom
ozankenangungor wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
d9b5cd3 to
e5c3dfd
Compare
This comment has been minimized.
This comment has been minimized.
e5c3dfd to
6c7f43c
Compare
nnethercote
reviewed
Apr 13, 2026
Contributor
There was a problem hiding this comment.
When doing a PR that changes an error message and also adds a new ui test, it's very helpful for reviewers if you add the new ui test in the first commit, and then make the error message change in the second commit. That way the change in behaviour is completely clear.
Contributor
|
This is a simple PR but borrowing (and the language around it) is subtle enough that I will pass this on to someone who is much more of an expert. r? @estebank |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small diagnostics-only fix for #154275.
This keeps the overall E0502 wording as-is and just makes the earlier label more specific in the &self.field / later mutable self case.