summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr')
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr61
1 files changed, 6 insertions, 55 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
index e745cbd24..dfa5ea8c4 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
@@ -1,58 +1,9 @@
-error[E0277]: can't drop `NonTrivialDrop` in const contexts
- --> $DIR/const-drop-fail.rs:28:23
+error[E0493]: destructor of `T` cannot be evaluated at compile-time
+ --> $DIR/const-drop-fail.rs:24:36
|
-LL | const _: () = check($exp);
- | ^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `NonTrivialDrop`
-...
-LL | / check_all! {
-LL | | NonTrivialDrop,
-LL | | ConstImplWithDropGlue(NonTrivialDrop),
-LL | | }
- | |_- in this macro invocation
- |
-note: the trait `Destruct` is implemented for `NonTrivialDrop`, but that implementation is not `const`
- --> $DIR/const-drop-fail.rs:28:23
- |
-LL | const _: () = check($exp);
- | ^^^^^^^^^^^
-...
-LL | / check_all! {
-LL | | NonTrivialDrop,
-LL | | ConstImplWithDropGlue(NonTrivialDrop),
-LL | | }
- | |_- in this macro invocation
- = note: this error originates in the macro `check_all` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: can't drop `NonTrivialDrop` in const contexts
- --> $DIR/const-drop-fail.rs:28:23
- |
-LL | const _: () = check($exp);
- | ^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Destruct` is not implemented for `NonTrivialDrop`
-...
-LL | / check_all! {
-LL | | NonTrivialDrop,
-LL | | ConstImplWithDropGlue(NonTrivialDrop),
-LL | | }
- | |_- in this macro invocation
- |
-note: the trait `Destruct` is implemented for `NonTrivialDrop`, but that implementation is not `const`
- --> $DIR/const-drop-fail.rs:28:23
- |
-LL | const _: () = check($exp);
- | ^^^^^^^^^^^
-...
-LL | / check_all! {
-LL | | NonTrivialDrop,
-LL | | ConstImplWithDropGlue(NonTrivialDrop),
-LL | | }
- | |_- in this macro invocation
-note: required because it appears within the type `ConstImplWithDropGlue`
- --> $DIR/const-drop-fail.rs:18:8
- |
-LL | struct ConstImplWithDropGlue(NonTrivialDrop);
- | ^^^^^^^^^^^^^^^^^^^^^
- = note: this error originates in the macro `check_all` (in Nightly builds, run with -Z macro-backtrace for more info)
+LL | const fn check<T: ~const Destruct>(_: T) {}
+ | ^ the destructor for this type cannot be evaluated in constant functions
-error: aborting due to 2 previous errors
+error: aborting due to previous error
-For more information about this error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0493`.