rust/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
2023-12-10 10:42:34 +00:00

29 lines
1.4 KiB
Plaintext

error[E0277]: can't compare `impl PartialEq + Destruct + Copy` with `impl PartialEq + Destruct + Copy`
--> $DIR/const-impl-trait.rs:28:17
|
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `impl PartialEq + Destruct + Copy == impl PartialEq + Destruct + Copy`
|
= help: the trait `~const PartialEq` is not implemented for `impl PartialEq + Destruct + Copy`
note: required by a bound in `Foo::{opaque#0}`
--> $DIR/const-impl-trait.rs:24:22
|
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
| ^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
error[E0277]: can't drop `impl PartialEq + Destruct + Copy`
--> $DIR/const-impl-trait.rs:28:17
|
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `impl PartialEq + Destruct + Copy`
|
note: required by a bound in `Foo::{opaque#0}`
--> $DIR/const-impl-trait.rs:24:41
|
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
| ^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.