fix suggestion for diagnostic error E0027#132025
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @wesleywiser (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
compiler/rustc_hir_typeck/src/pat.rs
Outdated
| let field_name = name.to_string(); | ||
| if is_number(&field_name) { format!("{field_name}: _") } else { field_name } | ||
| if is_number(&field_name) { | ||
| format!("{}: _", field_name) |
There was a problem hiding this comment.
Why did you change this? {field_name}: _ is fine, right?
There was a problem hiding this comment.
I agree with you. There was no need for the change. I will revert it.
compiler/rustc_hir_typeck/src/pat.rs
Outdated
| format!( | ||
| "if you don't care about {these} missing field{s}, you can explicitly ignore {them}", | ||
| these = pluralize!("this", len), | ||
| "if the value{s} {are} not relevant, discard {them} explicitly", |
There was a problem hiding this comment.
I think the message did not need to be changed. Tweaking the suggestion was sufficient.
There was a problem hiding this comment.
Ok, reverted the message change in 10b60eb.
rust/compiler/rustc_hir_typeck/src/pat.rs
Line 2068 in 10b60eb
|
@rustbot label -S-waiting-on-author +S-waiting-on-review |
|
@bors r+ rollup |
fix suggestion for diagnostic error E0027 Closes rust-lang#132008
Rollup of 9 pull requests Successful merges: - rust-lang#131153 (Improve duplicate derive Copy/Clone diagnostics) - rust-lang#131341 (Support clobber_abi and vector registers (clobber-only) in PowerPC inline assembly) - rust-lang#132025 (fix suggestion for diagnostic error E0027) - rust-lang#132153 (Stabilise `const_char_encode_utf16`.) - rust-lang#132303 (More tests for non-exhaustive C-like enums in FFI) - rust-lang#132473 ([core/fmt] Replace checked slice indexing by unchecked to support panic-free code) - rust-lang#132598 (Clippy: Move some attribute lints to be early pass (post expansion)) - rust-lang#132606 (Improve example of `impl Pattern for &[char]`) - rust-lang#132609 (docs: fix grammar in doc comment at unix/process.rs) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 11 pull requests Successful merges: - rust-lang#131153 (Improve duplicate derive Copy/Clone diagnostics) - rust-lang#132025 (fix suggestion for diagnostic error E0027) - rust-lang#132303 (More tests for non-exhaustive C-like enums in FFI) - rust-lang#132492 (remove support for extern-block const intrinsics) - rust-lang#132587 (Revert "Avoid nested replacement ranges" from rust-lang#129346.) - rust-lang#132596 ([rustdoc] Fix `--show-coverage` when JSON output format is used) - rust-lang#132598 (Clippy: Move some attribute lints to be early pass (post expansion)) - rust-lang#132601 (Update books) - rust-lang#132606 (Improve example of `impl Pattern for &[char]`) - rust-lang#132608 (document `type_implements_trait`) - rust-lang#132609 (docs: fix grammar in doc comment at unix/process.rs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132025 - duncpro:E0027, r=compiler-errors fix suggestion for diagnostic error E0027 Closes rust-lang#132008
Closes #132008