]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / rfc-2632-const-trait-impl / const_derives / derive-const-non-const-type.stderr
1 error[E0015]: cannot call non-const fn `<A as Default>::default` in constant functions
2   --> $DIR/derive-const-non-const-type.rs:10:14
3    |
4 LL | #[derive_const(Default)]
5    |                ------- in this derive macro expansion
6 LL | pub struct S(A);
7    |              ^
8    |
9    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
10    = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0015`.