-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Fix the issue of suggesting unwrap/expect for shorthand field #118413
Fix the issue of suggesting unwrap/expect for shorthand field #118413
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
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.
r=me when green
It would be really cool if you checked other suggestion code for this bug as well |
@bors r+ |
@bors rollup |
I reviewed some other suggestions in this file, and added several new fix. suggesting add |
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+ |
…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
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
Fixes #118145