summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr')
-rw-r--r--src/test/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr b/src/test/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr
new file mode 100644
index 000000000..9e8b8f8c6
--- /dev/null
+++ b/src/test/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr
@@ -0,0 +1,24 @@
+error[E0277]: the trait bound `S: ~const Foo` is not satisfied
+ --> $DIR/super-traits-fail.rs:13:12
+ |
+LL | impl const Bar for S {}
+ | ^^^ the trait `~const Foo` is not implemented for `S`
+ |
+note: the trait `Foo` is implemented for `S`, but that implementation is not `const`
+ --> $DIR/super-traits-fail.rs:13:12
+ |
+LL | impl const Bar for S {}
+ | ^^^
+note: required by a bound in `Bar`
+ --> $DIR/super-traits-fail.rs:6:12
+ |
+LL | trait Bar: ~const Foo {}
+ | ^^^^^^^^^^ required by this bound in `Bar`
+help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
+ |
+LL | impl const Bar for S where S: ~const Foo {}
+ | +++++++++++++++++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.