summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr')
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr55
1 files changed, 8 insertions, 47 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr
index 375f5d2c5..100d1df87 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr
@@ -1,50 +1,11 @@
-error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
- --> $DIR/const-drop-fail-2.rs:31:23
+error[E0493]: destructor of `T` cannot be evaluated at compile-time
+ --> $DIR/const-drop-fail-2.rs:21:36
|
-LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
- |
-note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
- --> $DIR/const-drop-fail-2.rs:31:23
- |
-LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: required by a bound in `ConstDropImplWithBounds`
- --> $DIR/const-drop-fail-2.rs:21:35
- |
-LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
- | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
-
-error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
- --> $DIR/const-drop-fail-2.rs:32:5
- |
-LL | ConstDropImplWithBounds(PhantomData)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
- |
-note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
- --> $DIR/const-drop-fail-2.rs:32:5
- |
-LL | ConstDropImplWithBounds(PhantomData)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: required by a bound in `ConstDropImplWithBounds`
- --> $DIR/const-drop-fail-2.rs:21:35
- |
-LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
- | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
-
-error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not
- --> $DIR/const-drop-fail-2.rs:37:9
- |
-LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
- | ^^^^^^^^
- |
-note: the implementor must specify the same requirement
- --> $DIR/const-drop-fail-2.rs:35:1
- |
-LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | const fn check<T: ~const Destruct>(_: T) {}
+ | ^ - value is dropped here
+ | |
+ | the destructor for this type cannot be evaluated in constant functions
-error: aborting due to 3 previous errors
+error: aborting due to previous error
-Some errors have detailed explanations: E0277, E0367.
-For more information about an error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0493`.