Fix the issue of suggesting unwrap/expect for shorthand field#118413
Merged
bors merged 2 commits intorust-lang:masterfrom Nov 29, 2023
Merged
Fix the issue of suggesting unwrap/expect for shorthand field#118413bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Collaborator
|
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
Contributor
|
It would be really cool if you checked other suggestion code for this bug as well |
Contributor
|
@bors r+ |
Collaborator
Contributor
|
@bors rollup |
Member
Author
I reviewed some other suggestions in this file, and added several new fix. suggesting add |
Contributor
|
I don't know if the compiler currently has the machinery to allow us to make this fix in general :/ This is good for now. Thanks for the detailed tests. @bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2023
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#118342 (Dont suggest `!` for path in function call if it has generic args) - rust-lang#118383 (Address unused tuple struct fields in the standard library) - rust-lang#118401 (`rustc_ast_lowering` cleanups) - rust-lang#118409 (format_foreign.rs: unwrap return Option value for `fn position`, as it always returns Some) - rust-lang#118413 (Fix the issue of suggesting unwrap/expect for shorthand field) - rust-lang#118425 (Update cargo) - rust-lang#118429 (Fix a typo in a `format_args!` note) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2023
Rollup merge of rust-lang#118413 - chenyukang:yukang-fix-118145-unwrap-for-shorthand, r=compiler-errors Fix the issue of suggesting unwrap/expect for shorthand field Fixes rust-lang#118145
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.
Fixes #118145