diff options
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr')
| -rw-r--r-- | tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr new file mode 100644 index 00000000000..258f95b5c4a --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr @@ -0,0 +1,35 @@ +error[E0308]: mismatched types + --> $DIR/unsatisfied-const-trait-bound.rs:27: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:32: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 `Ty: const Trait` is not satisfied + --> $DIR/unsatisfied-const-trait-bound.rs:20:15 + | +LL | require::<Ty>(); + | ^^ the trait `const Trait` is not implemented for `Ty` + | + = help: the trait `Trait` is implemented for `Ty` +note: required by a bound in `require` + --> $DIR/unsatisfied-const-trait-bound.rs:6: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`. |
