rust/compiler/rustc_errors/src
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
..
json Implement -Ztrack-diagnostics 2022-10-19 00:08:20 +02:00
annotate_snippet_emitter_writer.rs Remove some redundant arguments 2022-11-11 14:17:27 +00:00
diagnostic.rs Fix compilation issue after rebase 2022-11-18 14:46:36 -08:00
diagnostic_builder.rs Auto merge of #103858 - Mark-Simulacrum:bump-bootstrap, r=pietroalbini 2022-11-14 00:07:19 +00:00
diagnostic_impls.rs Auto merge of #104591 - Manishearth:rollup-b3ser4e, r=Manishearth 2022-11-18 23:20:53 +00:00
emitter.rs Rollup merge of #103117 - joshtriplett:use-is-terminal, r=eholk 2022-11-19 15:35:18 +01:00
json.rs Implement -Ztrack-diagnostics 2022-10-19 00:08:20 +02:00
lib.rs Rollup merge of #104504 - compiler-errors:fru-syntax-note, r=estebank 2022-11-20 23:50:27 +01:00
lock.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
registry.rs Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
snippet.rs Compute most of Public/Exported access level in rustc_resolve 2022-01-09 21:33:14 +00:00
styled_buffer.rs Spellchecking some comments 2022-03-30 01:39:38 -04:00
translation.rs Display help message when fluent arg was referenced incorrectly 2022-11-09 22:38:10 +01:00