rust/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
889 B
Plaintext
Raw Normal View History

2021-07-04 04:24:20 +00:00
error: const trait implementations may not use non-const default functions
--> $DIR/impl-with-default-fn-fail.rs:17:1
|
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
--> $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`
--> $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-07-04 04:24:20 +00:00
error: aborting due to 3 previous errors
2021-07-04 04:24:20 +00:00
For more information about this error, try `rustc --explain E0046`.