about summary refs log tree commit diff
path: root/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stderr')
-rw-r--r--src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stderr27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stderr b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stderr
new file mode 100644
index 00000000000..e962503d7df
--- /dev/null
+++ b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stderr
@@ -0,0 +1,27 @@
+error[E0277]: the trait bound `NonTrivialDrop: Drop` is not satisfied
+  --> $DIR/const-drop-fail.rs:28:5
+   |
+LL |     NonTrivialDrop,
+   |     ^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `NonTrivialDrop`
+   |
+note: required by a bound in `check`
+  --> $DIR/const-drop-fail.rs:19:19
+   |
+LL | const fn check<T: ~const Drop>(_: T) {}
+   |                   ^^^^^^^^^^^ required by this bound in `check`
+
+error[E0277]: the trait bound `ConstImplWithDropGlue: Drop` is not satisfied
+  --> $DIR/const-drop-fail.rs:30:5
+   |
+LL |     ConstImplWithDropGlue(NonTrivialDrop),
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `ConstImplWithDropGlue`
+   |
+note: required by a bound in `check`
+  --> $DIR/const-drop-fail.rs:19:19
+   |
+LL | const fn check<T: ~const Drop>(_: T) {}
+   |                   ^^^^^^^^^^^ required by this bound in `check`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.