2024-08-24 17:22:48 +00:00
|
|
|
error: generic parameters may not be used in const operations
|
|
|
|
--> $DIR/default-field-values-failures.rs:22:23
|
|
|
|
|
|
|
|
|
LL | bat: i32 = <Qux<{ C }> as T>::K,
|
|
|
|
| ^ cannot perform const operation using `C`
|
|
|
|
|
|
|
|
|
= help: const parameters may only be used as standalone arguments, i.e. `C`
|
|
|
|
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
|
|
|
|
|
2024-11-26 17:53:00 +00:00
|
|
|
error: default field in tuple struct
|
|
|
|
--> $DIR/default-field-values-failures.rs:26:22
|
|
|
|
|
|
|
|
|
LL | pub struct Rak(i32 = 42);
|
|
|
|
| ^^ default fields are only supported on structs
|
|
|
|
|
2024-08-24 17:22:48 +00:00
|
|
|
error[E0277]: the trait bound `S: Default` is not satisfied
|
|
|
|
--> $DIR/default-field-values-failures.rs:14:5
|
|
|
|
|
|
|
|
|
LL | #[derive(Debug, Default)]
|
|
|
|
| ------- in this derive macro expansion
|
|
|
|
LL | pub struct Bar {
|
|
|
|
LL | pub bar: S,
|
|
|
|
| ^^^^^^^^^^ the trait `Default` is not implemented for `S`
|
|
|
|
|
|
|
|
|
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
help: consider annotating `S` with `#[derive(Default)]`
|
|
|
|
|
|
|
|
|
LL + #[derive(Default)]
|
|
|
|
LL | pub struct S;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: missing mandatory field `bar`
|
2024-11-26 17:53:00 +00:00
|
|
|
--> $DIR/default-field-values-failures.rs:47:21
|
2024-08-24 17:22:48 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Bar { .. };
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: generic `Self` types are currently not permitted in anonymous constants
|
|
|
|
--> $DIR/default-field-values-failures.rs:20:14
|
|
|
|
|
|
|
|
|
LL | bar: S = Self::S,
|
|
|
|
| ^^^^
|
|
|
|
|
2024-11-26 17:53:00 +00:00
|
|
|
error: aborting due to 5 previous errors
|
2024-08-24 17:22:48 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|