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