summaryrefslogtreecommitdiffstats
path: root/src/test/ui/static/static-drop-scope.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:28 +0000
commit94a0819fe3a0d679c3042a77bfe6a2afc505daea (patch)
tree2b827afe6a05f3538db3f7803a88c4587fe85648 /src/test/ui/static/static-drop-scope.rs
parentAdding upstream version 1.64.0+dfsg1. (diff)
downloadrustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.tar.xz
rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.zip
Adding upstream version 1.66.0+dfsg1.upstream/1.66.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/test/ui/static/static-drop-scope.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/ui/static/static-drop-scope.rs b/src/test/ui/static/static-drop-scope.rs
index e7ea8663d..34afa9873 100644
--- a/src/test/ui/static/static-drop-scope.rs
+++ b/src/test/ui/static/static-drop-scope.rs
@@ -5,33 +5,33 @@ impl Drop for WithDtor {
}
static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
-//~^ ERROR destructors cannot be evaluated at compile-time
+//~^ ERROR destructor of
//~| ERROR temporary value dropped while borrowed
const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
-//~^ ERROR destructors cannot be evaluated at compile-time
+//~^ ERROR destructor of
//~| ERROR temporary value dropped while borrowed
static EARLY_DROP_S: i32 = (WithDtor, 0).1;
-//~^ ERROR destructors cannot be evaluated at compile-time
+//~^ ERROR destructor of
const EARLY_DROP_C: i32 = (WithDtor, 0).1;
-//~^ ERROR destructors cannot be evaluated at compile-time
+//~^ ERROR destructor of
const fn const_drop<T>(_: T) {}
-//~^ ERROR destructors cannot be evaluated at compile-time
+//~^ ERROR destructor of
const fn const_drop2<T>(x: T) {
(x, ()).1
- //~^ ERROR destructors cannot be evaluated at compile-time
+ //~^ ERROR destructor of
}
const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1;
-//~^ ERROR destructors cannot be evaluated at compile-time
+//~^ ERROR destructor of
const HELPER: Option<WithDtor> = Some(WithDtor);
const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1;
-//~^ ERROR destructors cannot be evaluated at compile-time
+//~^ ERROR destructor of
fn main () {}