-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Change suggestion of field when not in self context #60061
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
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
r? @davidtwco |
CC @nagisa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@bors r+ rollup |
📌 Commit 37d4d38e3d6e934db6852de4a4a3983a0f16047d has been approved by |
@@ -2,7 +2,7 @@ error[E0425]: cannot find value `meows` in this scope | |||
--> $DIR/class-missing-self.rs:9:7 | |||
| | |||
LL | meows += 1; | |||
| ^^^^^ help: try: `self.meows` | |||
| ^^^^^ help: you might have meant to use the available field: `self.meows` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(As the author of that "try", I still prefer less wordy labels.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The longer text is there for people that come from languages like Java, where implicit this
. Having the longer text let us differentiate between fields and bindings when communicating with users.
@bors r- |
This comment has been minimized.
This comment has been minimized.
@bors r=davidtwco |
📌 Commit 9daeaa8 has been approved by |
Change suggestion of field when not in self context Fix rust-lang#60057.
Change suggestion of field when not in self context Fix rust-lang#60057.
Change suggestion of field when not in self context Fix rust-lang#60057.
Failed in #60100 (comment), @bors r- |
@bors r=davidtwco rebased |
📌 Commit 2f4035d has been approved by |
Change suggestion of field when not in self context Fix rust-lang#60057.
Rollup of 16 pull requests Successful merges: - #59915 (Implement event filtering for self-profiler.) - #59933 (Make clear that format padding doesn't work for Debug) - #60023 (implement specialized nth_back() for Bytes, Fuse and Enumerate) - #60032 (Remove unwanted z-index change) - #60041 (Simplify the returning of a Result a bit) - #60045 (Suggest appropriate path when calling associated item on bare types) - #60052 (Correct unused parameter diagnostic) - #60056 (Update rustfmt to 1.2.1) - #60060 (whitelist RTM x86 target cpu feature) - #60061 (Change suggestion of field when not in self context) - #60064 (Point at try `?` on errors affecting the err match arm of the desugared code) - #60078 (Use more realistic example for thread builder) - #60080 (Fix small errors in docs for `rchunks_exact` and `rchunks_exact_mut`.) - #60082 (Update miri) - #60097 (Use -mergefunc-use-aliases for any LLVM >= 8) - #60098 (libcore: deny `elided_lifetimes_in_paths`) Failed merges: r? @ghost
Fix #60057.