rust/compiler
Matthias Krüger fce077b053
Rollup merge of #104504 - compiler-errors:fru-syntax-note, r=estebank
Add a detailed note for missing comma typo w/ FRU syntax

Thanks to `@pierwill` for working on this with me!

Fixes #104373, perhaps `@alice-i-cecile` can comment on the new error for the example provided on that issue -- feedback is welcome.

```
error[E0063]: missing field `defaulted` in initializer of `Outer`
  --> $DIR/multi-line-fru-suggestion.rs:14:5
   |
LL |     Outer {
   |     ^^^^^ missing `defaulted`
   |
note: this expression may have been misinterpreted as a `..` range expression
  --> $DIR/multi-line-fru-suggestion.rs:16:16
   |
LL |           inner: Inner {
   |  ________________^
LL | |             a: 1,
LL | |             b: 2,
LL | |         }
   | |_________^ this expression does not end in a comma...
LL |           ..Default::default()
   |           ^^^^^^^^^^^^^^^^^^^^ ... so this is interpreted as a `..` range expression, instead of functional record update syntax
help: to set the remaining fields from `Default::default()`, separate the last named field with a comma
   |
LL |         },
   |          +

error: aborting due to previous error

For more information about this error, try `rustc --explain E0063`.
```
2022-11-20 23:50:27 +01:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Use ThinVec in ast::Path. 2022-11-17 13:56:38 +11:00
rustc_ast_lowering Auto merge of #101562 - nnethercote:shrink-ast-Expr-harder, r=petrochenkov 2022-11-18 16:56:12 +00:00
rustc_ast_passes
rustc_ast_pretty Box ExprKind::{Closure,MethodCall}, and QSelf in expressions, types, and patterns. 2022-11-17 13:45:59 +11:00
rustc_attr
rustc_baked_icu_data Update crate documentation of rustc_baked_icu_data crate 2022-11-18 14:46:36 -08:00
rustc_borrowck require an ErrorGuaranteed to taint infcx with errors 2022-11-18 13:25:17 +00:00
rustc_builtin_macros Box ExprKind::{Closure,MethodCall}, and QSelf in expressions, types, and patterns. 2022-11-17 13:45:59 +11:00
rustc_codegen_cranelift Rollup merge of #104001 - Ayush1325:custom-entry, r=bjorn3 2022-11-19 11:54:43 +05:30
rustc_codegen_gcc Rollup merge of #104001 - Ayush1325:custom-entry, r=bjorn3 2022-11-19 11:54:43 +05:30
rustc_codegen_llvm Rollup merge of #104001 - Ayush1325:custom-entry, r=bjorn3 2022-11-19 11:54:43 +05:30
rustc_codegen_ssa Rollup merge of #104001 - Ayush1325:custom-entry, r=bjorn3 2022-11-19 11:54:43 +05:30
rustc_const_eval Rollup merge of #104564 - RalfJung:either, r=oli-obk 2022-11-20 18:21:48 +01:00
rustc_data_structures Auto merge of #97870 - eggyal:inplace_fold_spec, r=wesleywiser 2022-11-19 02:28:47 +00:00
rustc_driver Rollup merge of #103117 - joshtriplett:use-is-terminal, r=eholk 2022-11-19 15:35:18 +01:00
rustc_error_codes Rollup merge of #104339 - compiler-errors:rustc_deny_explicit_impl, r=cjgillot 2022-11-15 10:44:12 +01:00
rustc_error_messages Rollup merge of #104504 - compiler-errors:fru-syntax-note, r=estebank 2022-11-20 23:50:27 +01:00
rustc_errors Rollup merge of #104504 - compiler-errors:fru-syntax-note, r=estebank 2022-11-20 23:50:27 +01:00
rustc_expand Cleanup macro matching recovery 2022-11-19 17:46:04 +01:00
rustc_feature rename to string_deref_patterns 2022-11-18 06:16:20 +00:00
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #98914 - fee1-dead-contrib:min-deref-patterns, r=compiler-errors 2022-11-20 07:16:42 +00:00
rustc_hir_analysis Rollup merge of #104467 - fuzzypixelz:fix/attempt-to-substract-with-overflow, r=compiler-errors 2022-11-20 13:15:59 +09:00
rustc_hir_pretty Store a LocalDefId in hir::Variant & hir::Field. 2022-11-13 14:06:51 +00:00
rustc_hir_typeck Rollup merge of #104504 - compiler-errors:fru-syntax-note, r=estebank 2022-11-20 23:50:27 +01:00
rustc_incremental
rustc_index
rustc_infer Rollup merge of #104554 - BoxyUwU:less_unchecked_pls, r=lcnr 2022-11-19 11:54:45 +05:30
rustc_interface Enable icu sync feature for parallel compiler 2022-11-18 14:46:35 -08:00
rustc_lexer Use token::Lit in ast::ExprKind::Lit. 2022-11-16 09:41:28 +11:00
rustc_lint Auto merge of #98914 - fee1-dead-contrib:min-deref-patterns, r=compiler-errors 2022-11-20 07:16:42 +00:00
rustc_lint_defs Merge branch 'master' into patch-2 2022-11-15 21:16:11 +01:00
rustc_llvm Introduce composite debuginfo. 2022-11-15 17:53:50 +00:00
rustc_log
rustc_macros couple of clippy::perf fixes 2022-11-18 10:30:47 +01:00
rustc_metadata Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-dead 2022-11-17 07:42:27 +00:00
rustc_middle Rollup merge of #104564 - RalfJung:either, r=oli-obk 2022-11-20 18:21:48 +01:00
rustc_mir_build Rollup merge of #104564 - RalfJung:either, r=oli-obk 2022-11-20 18:21:48 +01:00
rustc_mir_dataflow couple of clippy::perf fixes 2022-11-18 10:30:47 +01:00
rustc_mir_transform Rollup merge of #104564 - RalfJung:either, r=oli-obk 2022-11-20 18:21:48 +01:00
rustc_monomorphize Make "long type" printing type aware 2022-11-18 08:42:59 -08:00
rustc_parse Cleanup macro matching recovery 2022-11-19 17:46:04 +01:00
rustc_parse_format shift no characters when using raw string literals 2022-11-15 14:28:20 +09:00
rustc_passes couple of clippy::perf fixes 2022-11-18 10:30:47 +01:00
rustc_plugin_impl
rustc_privacy Store a LocalDefId in hir::Variant & hir::Field. 2022-11-13 14:06:51 +00:00
rustc_query_impl
rustc_query_system
rustc_resolve Auto merge of #104573 - matthiaskrgr:rollup-k36ybtp, r=matthiaskrgr 2022-11-18 20:26:58 +00:00
rustc_save_analysis Store a LocalDefId in hir::Variant & hir::Field. 2022-11-13 14:06:51 +00:00
rustc_serialize
rustc_session track_errors use a delay_span_bug 2022-11-18 13:25:17 +00:00
rustc_smir
rustc_span Auto merge of #98914 - fee1-dead-contrib:min-deref-patterns, r=compiler-errors 2022-11-20 07:16:42 +00:00
rustc_symbol_mangling
rustc_target Rollup merge of #104001 - Ayush1325:custom-entry, r=bjorn3 2022-11-19 11:54:43 +05:30
rustc_trait_selection Auto merge of #98914 - fee1-dead-contrib:min-deref-patterns, r=compiler-errors 2022-11-20 07:16:42 +00:00
rustc_traits Auto merge of #104522 - RalfJung:try_normalize_after_erasing_regions, r=oli-obk 2022-11-20 01:16:52 +00:00
rustc_transmute
rustc_ty_utils add is_sized method on Abi and Layout, and use it 2022-11-13 12:23:53 +01:00
rustc_type_ir