2022-03-14 13:46:12 -05:00
|
|
|
error[E0063]: missing fields `b` and `d` in initializer of `A`
|
|
|
|
--> $DIR/struct-record-suggestion.rs:10:13
|
|
|
|
|
|
2022-08-09 02:04:37 -05:00
|
|
|
LL | let q = A { c: 5..Default::default() };
|
2022-03-14 13:46:12 -05:00
|
|
|
| ^ missing `b` and `d`
|
|
|
|
|
|
2022-11-16 13:10:38 -06:00
|
|
|
note: this expression may have been misinterpreted as a `..` range expression
|
|
|
|
--> $DIR/struct-record-suggestion.rs:10:20
|
|
|
|
|
|
|
|
|
LL | let q = A { c: 5..Default::default() };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2022-03-14 13:46:12 -05:00
|
|
|
help: to set the remaining fields from `Default::default()`, separate the last named field with a comma
|
|
|
|
|
|
2022-11-16 13:10:38 -06:00
|
|
|
LL | let q = A { c: 5, ..Default::default() };
|
2022-03-14 13:46:12 -05:00
|
|
|
| +
|
|
|
|
|
2022-08-09 02:04:37 -05:00
|
|
|
error[E0308]: mismatched types
|
2022-11-16 13:10:38 -06:00
|
|
|
--> $DIR/struct-record-suggestion.rs:23:20
|
2022-08-09 02:04:37 -05:00
|
|
|
|
|
|
|
|
LL | let q = B { b: 1..Default::default() };
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `Range<{integer}>`
|
2022-08-09 02:04:37 -05:00
|
|
|
|
|
|
|
|
= note: expected type `u32`
|
|
|
|
found struct `std::ops::Range<{integer}>`
|
2022-11-16 13:10:38 -06:00
|
|
|
note: this expression may have been misinterpreted as a `..` range expression
|
|
|
|
--> $DIR/struct-record-suggestion.rs:23:20
|
|
|
|
|
|
|
|
|
LL | let q = B { b: 1..Default::default() };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2022-08-09 02:04:37 -05:00
|
|
|
help: to set the remaining fields from `Default::default()`, separate the last named field with a comma
|
|
|
|
|
|
2022-11-16 13:10:38 -06:00
|
|
|
LL | let q = B { b: 1, ..Default::default() };
|
2022-08-09 02:04:37 -05:00
|
|
|
| +
|
|
|
|
|
2022-11-16 13:10:38 -06:00
|
|
|
error: aborting due to 2 previous errors
|
2022-03-14 13:46:12 -05:00
|
|
|
|
|
|
|
Some errors have detailed explanations: E0063, E0308.
|
|
|
|
For more information about an error, try `rustc --explain E0063`.
|