about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-01-01 16:35:32 +1100
committerGitHub <noreply@github.com>2025-01-01 16:35:32 +1100
commit65cb7c66d0277571f0412d29fd237ea038b8c389 (patch)
treeb462f6e4f9233e069af57c879972d613bb6d0c2e /compiler/rustc_incremental/src
parentcf7d7f509679ef47e1ac1a2c99e696226c20235b (diff)
parent2b2ea9e875dc9ae6c2d351078f1f43e533c9d780 (diff)
downloadrust-65cb7c66d0277571f0412d29fd237ea038b8c389.tar.gz
rust-65cb7c66d0277571f0412d29fd237ea038b8c389.zip
Rollup merge of #134979 - estebank:default-lint-sugg, r=compiler-errors
Provide structured suggestion for `impl Default` of type where all fields have defaults

```
error: `Default` impl doesn't use the declared default field values
  --> $DIR/manual-default-impl-could-be-derived.rs:28:1
   |
LL | / impl Default for B {
LL | |     fn default() -> Self {
LL | |         B {
LL | |             x: s(),
   | |                --- this field has a default value
LL | |             y: 0,
   | |                - this field has a default value
...  |
LL | | }
   | |_^
   |
help: to avoid divergence in behavior between `Struct { .. }` and `<Struct as Default>::default()`, derive the `Default`
   |
LL ~ #[derive(Default)] struct B {
   |
```

Note that above the structured suggestion also includes completely removing the manual `impl`, but the rendering doesn't.
Diffstat (limited to 'compiler/rustc_incremental/src')
0 files changed, 0 insertions, 0 deletions