about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-01-18 20:07:05 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-01-18 20:33:15 +0000
commitdeef3ebaec2ff0ff818161f3b9b86a42bed5fe36 (patch)
tree29becbbad6d9a19783b3a25dfbcc54e3b5318c80 /compiler/rustc_interface/src
parentbbcf26fc33afb4695014aff22fa77dcb7d9eb715 (diff)
downloadrust-deef3ebaec2ff0ff818161f3b9b86a42bed5fe36.tar.gz
rust-deef3ebaec2ff0ff818161f3b9b86a42bed5fe36.zip
Emit a single privacy error for multiple fields on the same struct expression
Collect all unreachable fields in a single struct literal struct and emit a single error, instead of one error per private field.

```
error[E0451]: fields `beta` and `gamma` of struct `Alpha` are private
  --> $DIR/visibility.rs:18:13
   |
LL |     let _x = Alpha {
   |              ----- in this type
LL |         beta: 0,
   |         ^^^^^^^ private field
LL |         ..
   |         ^^ field `gamma` is private
```
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions