2021-07-04 04:24:20 +00:00
|
|
|
error: const trait implementations may not use non-const default functions
|
2022-02-09 18:53:40 +00:00
|
|
|
--> $DIR/impl-with-default-fn-fail.rs:17:1
|
2021-06-23 10:37:26 +00:00
|
|
|
|
|
|
|
|
LL | / impl const Tr for S {
|
|
|
|
LL | | fn req(&self) {}
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
2021-07-04 04:24:20 +00:00
|
|
|
|
|
|
|
|
= note: `prov` not implemented
|
|
|
|
|
|
|
|
error: const trait implementations may not use non-const default functions
|
2022-02-09 18:53:40 +00:00
|
|
|
--> $DIR/impl-with-default-fn-fail.rs:27:1
|
2021-07-04 04:24:20 +00:00
|
|
|
|
|
|
|
|
LL | / impl const Tr for u32 {
|
|
|
|
LL | | fn req(&self) {}
|
|
|
|
LL | | fn default() {}
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: `prov` not implemented
|
|
|
|
|
|
|
|
error[E0046]: not all trait items implemented, missing: `req`
|
2022-02-09 18:53:40 +00:00
|
|
|
--> $DIR/impl-with-default-fn-fail.rs:21:1
|
2021-07-04 04:24:20 +00:00
|
|
|
|
|
|
|
|
LL | fn req(&self);
|
|
|
|
| -------------- `req` from trait
|
|
|
|
...
|
|
|
|
LL | impl const Tr for u16 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ missing `req` in implementation
|
2021-06-23 10:37:26 +00:00
|
|
|
|
2021-07-04 04:24:20 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2021-06-23 10:37:26 +00:00
|
|
|
|
2021-07-04 04:24:20 +00:00
|
|
|
For more information about this error, try `rustc --explain E0046`.
|