diff options
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr')
| -rw-r--r-- | tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr index 2a9647da782..0141dcfb06f 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr @@ -1,21 +1,35 @@ -error[E0308]: mismatched types +error[E0277]: the trait bound `T: ~const Bar` is not satisfied --> $DIR/trait-where-clause-const.rs:21:5 | LL | T::b(); - | ^^^^^^ expected `host`, found `true` + | ^ the trait `~const Bar` is not implemented for `T` | - = note: expected constant `host` - found constant `true` +note: required by a bound in `Foo::b` + --> $DIR/trait-where-clause-const.rs:15:24 + | +LL | fn b() where Self: ~const Bar; + | ^^^^^^^^^^ required by this bound in `Foo::b` +help: consider further restricting this bound + | +LL | const fn test1<T: ~const Foo + Bar + ~const Bar>() { + | ++++++++++++ -error[E0308]: mismatched types - --> $DIR/trait-where-clause-const.rs:23:5 +error[E0277]: the trait bound `T: ~const Bar` is not satisfied + --> $DIR/trait-where-clause-const.rs:23:12 | LL | T::c::<T>(); - | ^^^^^^^^^^^ expected `host`, found `true` + | ^ the trait `~const Bar` is not implemented for `T` + | +note: required by a bound in `Foo::c` + --> $DIR/trait-where-clause-const.rs:16:13 + | +LL | fn c<T: ~const Bar>(); + | ^^^^^^^^^^ required by this bound in `Foo::c` +help: consider further restricting this bound | - = note: expected constant `host` - found constant `true` +LL | const fn test1<T: ~const Foo + Bar + ~const Bar>() { + | ++++++++++++ error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0277`. |
