From bafc51e01aea45da746afaf51d5783f0409d605b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 7 May 2021 18:56:16 +0200 Subject: remove const_fn feature gate --- src/test/ui/static/static-drop-scope.rs | 2 -- src/test/ui/static/static-drop-scope.stderr | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'src/test/ui/static') diff --git a/src/test/ui/static/static-drop-scope.rs b/src/test/ui/static/static-drop-scope.rs index 0de28d5469b..e7ea8663d5a 100644 --- a/src/test/ui/static/static-drop-scope.rs +++ b/src/test/ui/static/static-drop-scope.rs @@ -1,5 +1,3 @@ -#![feature(const_fn)] - struct WithDtor; impl Drop for WithDtor { diff --git a/src/test/ui/static/static-drop-scope.stderr b/src/test/ui/static/static-drop-scope.stderr index ed81734f6eb..ac32f217fd7 100644 --- a/src/test/ui/static/static-drop-scope.stderr +++ b/src/test/ui/static/static-drop-scope.stderr @@ -1,5 +1,5 @@ error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:9:60 + --> $DIR/static-drop-scope.rs:7:60 | LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); | ^^^^^^^^- value is dropped here @@ -7,7 +7,7 @@ LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); | statics cannot evaluate destructors error[E0716]: temporary value dropped while borrowed - --> $DIR/static-drop-scope.rs:9:60 + --> $DIR/static-drop-scope.rs:7:60 | LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); | ------^^^^^^^^- @@ -17,7 +17,7 @@ LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); | using this value as a static requires that borrow lasts for `'static` error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:13:59 + --> $DIR/static-drop-scope.rs:11:59 | LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); | ^^^^^^^^- value is dropped here @@ -25,7 +25,7 @@ LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); | constants cannot evaluate destructors error[E0716]: temporary value dropped while borrowed - --> $DIR/static-drop-scope.rs:13:59 + --> $DIR/static-drop-scope.rs:11:59 | LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); | ------^^^^^^^^- @@ -35,7 +35,7 @@ LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); | using this value as a constant requires that borrow lasts for `'static` error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:17:28 + --> $DIR/static-drop-scope.rs:15:28 | LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1; | ^^^^^^^^^^^^^ - value is dropped here @@ -43,7 +43,7 @@ LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1; | statics cannot evaluate destructors error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:20:27 + --> $DIR/static-drop-scope.rs:18:27 | LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1; | ^^^^^^^^^^^^^ - value is dropped here @@ -51,7 +51,7 @@ LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1; | constants cannot evaluate destructors error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:23:24 + --> $DIR/static-drop-scope.rs:21:24 | LL | const fn const_drop(_: T) {} | ^ - value is dropped here @@ -59,7 +59,7 @@ LL | const fn const_drop(_: T) {} | constant functions cannot evaluate destructors error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:27:5 + --> $DIR/static-drop-scope.rs:25:5 | LL | (x, ()).1 | ^^^^^^^ constant functions cannot evaluate destructors @@ -68,7 +68,7 @@ LL | } | - value is dropped here error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:31:34 + --> $DIR/static-drop-scope.rs:29:34 | LL | const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1; | ^^^^^^^^^^^^^^^^^^^ - value is dropped here @@ -76,7 +76,7 @@ LL | const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1; | constants cannot evaluate destructors error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:36:43 + --> $DIR/static-drop-scope.rs:34:43 | LL | const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1; | ^^^^^^^^^^^ - value is dropped here -- cgit 1.4.1-3-g733a5