rust/compiler
Zack M. Davis 14eb94fe7a don't suggest erroneous trailing comma after ..
In #76612, suggestions were added for missing fields in
patterns. However, the suggestions are being inserted just at the end
of the last field in the pattern—before any trailing comma after the
last field. This resulted in the "if you don't care about missing
fields" suggestion to recommend code with a trailing comma after the
field ellipsis (`..,`), which is actually not legal ("`..` must be at
the end and cannot have a trailing comma")!

Incidentally, the doc-comment on `error_unmentioned_fields` was using
`you_cant_use_this_field` as an example field name (presumably
copy-paste inherited from the description of Issue #76077), but
the present author found this confusing, because unmentioned fields
aren't necessarily unusable.

The suggested code in the diff this commit introduces to
`destructuring-assignment/struct_destructure_fail.stderr` doesn't
work, but it didn't work beforehand, either (because of the "found
reserved identifier `_`" thing), so you can't really call it a
regression; it could be fixed in a separate PR.

Resolves #78511.
2021-01-16 16:01:36 -08:00
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat Backport another LLVM commit to rustc_apfloat 2020-10-04 02:02:25 +02:00
rustc_arena stabilize min_const_generics 2020-12-26 18:24:10 +01:00
rustc_ast Remove unnecessary manual shrink_to_fit calls 2021-01-16 14:02:36 +01:00
rustc_ast_lowering Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_ast_passes Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_ast_pretty ast: Remove some indirection layers from values in key-value attributes 2021-01-09 21:50:39 +03:00
rustc_attr Get rid of clean::Deprecation 2020-12-14 22:00:46 -05:00
rustc_builtin_macros resolve: Simplify built-in macro table 2021-01-10 14:48:47 +03:00
rustc_codegen_cranelift Merge commit 'dbee13661efa269cb4cd57bb4c6b99a19732b484' into sync_cg_clif-2020-12-27 2020-12-27 10:30:38 +01:00
rustc_codegen_llvm Auto merge of #77885 - erikdesjardins:probeasm, r=cuviper 2021-01-16 03:10:52 +00:00
rustc_codegen_ssa Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_data_structures Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_driver Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_error_codes Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
rustc_errors Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_expand Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_feature Allow #[rustc_builtin_macro = "name"]. 2021-01-09 19:50:06 +01:00
rustc_fs_util Optimize away a fs::metadata call. 2021-01-06 08:33:15 -08:00
rustc_graphviz remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
rustc_hir Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_hir_pretty Auto merge of #79328 - c410-f3r:hir-if, r=matthewjasper 2021-01-14 14:41:58 +00:00
rustc_incremental Remove DepKind::CrateMetadata and pre-allocation of DepNodes 2021-01-12 11:22:57 -08:00
rustc_index Switch compiler/ to intra-doc links 2020-12-18 15:22:51 -05:00
rustc_infer Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_interface Remove DepKind::CrateMetadata and pre-allocation of DepNodes 2021-01-12 11:22:57 -08:00
rustc_lexer Return EOF_CHAR constant instead of magic char. 2021-01-07 13:20:04 +01:00
rustc_lint Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_lint_defs Introduce missing ABI lint on extern blocks 2021-01-13 07:49:16 -05:00
rustc_llvm Use probe-stack=inline-asm in LLVM 11+ 2021-01-14 22:49:16 -05:00
rustc_macros Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_metadata Auto merge of #80602 - tgnottingham:cratemetadata_you_aint_special, r=michaelwoerister 2021-01-15 21:13:35 +00:00
rustc_middle Auto merge of #80602 - tgnottingham:cratemetadata_you_aint_special, r=michaelwoerister 2021-01-15 21:13:35 +00:00
rustc_mir Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_mir_build Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_parse Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_parse_format Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_passes Auto merge of #79328 - c410-f3r:hir-if, r=matthewjasper 2021-01-14 14:41:58 +00:00
rustc_plugin_impl Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
rustc_privacy Separate out a hir::Impl struct 2021-01-12 20:32:33 -05:00
rustc_query_system Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_resolve Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_save_analysis Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_serialize rustc_serialize: fix incorrect signed LEB128 decoding 2021-01-11 12:13:26 -08:00
rustc_session Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_span Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_symbol_mangling Rollup merge of #79968 - bjorn3:better_drop_glue_debuginfo, r=matthewjasper 2021-01-10 16:55:55 +09:00
rustc_target Rollup merge of #80662 - rxrbln:master, r=estebank 2021-01-13 03:20:15 +01:00
rustc_trait_selection Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_traits fix: small typo error in chalk/mod.rs 2020-12-27 03:22:23 +01:00
rustc_ty_utils Auto merge of #77524 - Patryk27:fixes/66228, r=estebank 2021-01-13 20:35:58 +00:00
rustc_type_ir Fix typo in DebruijnIndex documentation 2020-12-12 16:13:06 +01:00
rustc_typeck don't suggest erroneous trailing comma after .. 2021-01-16 16:01:36 -08:00