Skip to content

Suggest calling method on nested field when struct is missing method - #96372

Merged
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:field-method-suggest
Apr 26, 2022
Merged

Suggest calling method on nested field when struct is missing method#96372
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:field-method-suggest

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

Similar to the suggestion to change x.field to x.nested.field, implement a similar suggestion for when x.method() should be replaced with x.nested.method().

@rustbotrustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 24, 2022
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 24, 2022
@oli-obkoli-obk added the A-diagnostics Area: Messages for errors, warnings, and lints label Apr 25, 2022
@oli-obk

Copy link
Copy Markdown
Contributor

Neat!

@bors r+ rollup

@bors

bors commented Apr 25, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit dff7f25 has been approved by oli-obk

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2022
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Apr 25, 2022
…t, r=oli-obk
Suggest calling method on nested field when struct is missing method
Similar to the suggestion to change `x.field` to `x.nested.field`, implement a similar suggestion for when `x.method()` should be replaced with `x.nested.method()`.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 26, 2022
…t, r=oli-obk
Suggest calling method on nested field when struct is missing method
Similar to the suggestion to change `x.field` to `x.nested.field`, implement a similar suggestion for when `x.method()` should be replaced with `x.nested.method()`.
This was referenced Apr 26, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2022
…laumeGomez
Rollup of 8 pull requests
Successful merges:
- rust-lang#94022 (Clarify that `Cow::into_owned` returns owned data)
- rust-lang#94703 (Fix codegen bug in "ptx-kernel" abi related to arg passing)
- rust-lang#95949 (Implement Default for AssertUnwindSafe)
- rust-lang#96361 (Switch JS code to ES6)
- rust-lang#96372 (Suggest calling method on nested field when struct is missing method)
- rust-lang#96386 (simplify `describe_field` func in borrowck's diagnostics part)
- rust-lang#96400 (Correct documentation for `Rvalue::ShallowInitBox`)
- rust-lang#96415 (Remove references to git.io)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit bb6265a into rust-lang:masterApr 26, 2022
@rustbotrustbot added this to the 1.62.0 milestone Apr 26, 2022
@compiler-errors
compiler-errors deleted the field-method-suggest branch August 11, 2023 20:01
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@compiler-errors@rust-highfive@oli-obk@bors@rustbot