about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-01-22 20:37:26 +0100
committerGitHub <noreply@github.com>2025-01-22 20:37:26 +0100
commit3b3687920337d20d41f2f44b97eed6ea30120100 (patch)
tree9725a6607ff3844707ab7df4d86601fc25abbd40 /compiler/rustc_codegen_gcc
parent5fab5429c4a48d606e1722a68eecbd40662daa75 (diff)
parent922e6bb2d4a5828cc12499c4f3dca685c3fd9002 (diff)
downloadrust-3b3687920337d20d41f2f44b97eed6ea30120100.tar.gz
rust-3b3687920337d20d41f2f44b97eed6ea30120100.zip
Rollup merge of #135794 - estebank:non-exhaustive-dfv-ctor, r=jieyouxu
Detect missing fields with default values and suggest `..`

When a struct ctor use has missing fields, if all those missing fields have defaults, suggest `..`:

```
error[E0063]: missing fields `field1` and `field2` in initializer of `S`
  --> $DIR/non-exhaustive-ctor.rs:16:13
   |
LL |     let _ = S { field: () };
   |             ^ missing `field1` and `field2`
   |
help: all remaining fields have default values, you can use those values with `..`
   |
LL |     let _ = S { field: (), .. };
   |                          ++++
```
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions