rust/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bou...

35 lines
1.2 KiB
Plaintext

error[E0308]: mismatched types
--> $DIR/unsatisfied-const-trait-bound.rs:29:37
|
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
| ^^^^^^^^^ expected `false`, found `true`
|
= note: expected constant `false`
found constant `true`
error[E0308]: mismatched types
--> $DIR/unsatisfied-const-trait-bound.rs:34:50
|
LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
| ^^^^^^^^^ expected `false`, found `host`
|
= note: expected constant `false`
found constant `host`
error[E0277]: the trait bound `Trait::{synthetic#0}: const Compat` is not satisfied
--> $DIR/unsatisfied-const-trait-bound.rs:22:15
|
LL | require::<Ty>();
| ^^ the trait `const Compat` is not implemented for `Trait::{synthetic#0}`
|
note: required by a bound in `require`
--> $DIR/unsatisfied-const-trait-bound.rs:7:15
|
LL | fn require<T: const Trait>() {}
| ^^^^^^^^^^^ required by this bound in `require`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.