1error[E0493]: destructor of `WithDtor` cannot be evaluated at compile-time 2 --> $DIR/static-drop-scope.rs:7:60 3 | 4LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); 5 | ^^^^^^^^- value is dropped here 6 | | 7 | the destructor for this type cannot be evaluated in statics 8 9error[E0716]: temporary value dropped while borrowed 10 --> $DIR/static-drop-scope.rs:7:60 11 | 12LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); 13 | ------^^^^^^^^- 14 | | | | 15 | | | temporary value is freed at the end of this statement 16 | | creates a temporary value which is freed while still in use 17 | using this value as a static requires that borrow lasts for `'static` 18 19error[E0493]: destructor of `WithDtor` cannot be evaluated at compile-time 20 --> $DIR/static-drop-scope.rs:11:59 21 | 22LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); 23 | ^^^^^^^^- value is dropped here 24 | | 25 | the destructor for this type cannot be evaluated in constants 26 27error[E0716]: temporary value dropped while borrowed 28 --> $DIR/static-drop-scope.rs:11:59 29 | 30LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); 31 | ------^^^^^^^^- 32 | | | | 33 | | | temporary value is freed at the end of this statement 34 | | creates a temporary value which is freed while still in use 35 | using this value as a constant requires that borrow lasts for `'static` 36 37error[E0493]: destructor of `(WithDtor, i32)` cannot be evaluated at compile-time 38 --> $DIR/static-drop-scope.rs:15:28 39 | 40LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1; 41 | ^^^^^^^^^^^^^ - value is dropped here 42 | | 43 | the destructor for this type cannot be evaluated in statics 44 45error[E0493]: destructor of `(WithDtor, i32)` cannot be evaluated at compile-time 46 --> $DIR/static-drop-scope.rs:18:27 47 | 48LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1; 49 | ^^^^^^^^^^^^^ - value is dropped here 50 | | 51 | the destructor for this type cannot be evaluated in constants 52 53error[E0493]: destructor of `T` cannot be evaluated at compile-time 54 --> $DIR/static-drop-scope.rs:21:24 55 | 56LL | const fn const_drop<T>(_: T) {} 57 | ^ - value is dropped here 58 | | 59 | the destructor for this type cannot be evaluated in constant functions 60 61error[E0493]: destructor of `(T, ())` cannot be evaluated at compile-time 62 --> $DIR/static-drop-scope.rs:25:5 63 | 64LL | (x, ()).1 65 | ^^^^^^^ the destructor for this type cannot be evaluated in constant functions 66LL | 67LL | } 68 | - value is dropped here 69 70error[E0493]: destructor of `(Option<WithDtor>, i32)` cannot be evaluated at compile-time 71 --> $DIR/static-drop-scope.rs:29:34 72 | 73LL | const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1; 74 | ^^^^^^^^^^^^^^^^^^^ - value is dropped here 75 | | 76 | the destructor for this type cannot be evaluated in constants 77 78error[E0493]: destructor of `(Option<WithDtor>, i32)` cannot be evaluated at compile-time 79 --> $DIR/static-drop-scope.rs:34:43 80 | 81LL | const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1; 82 | ^^^^^^^^^^^ - value is dropped here 83 | | 84 | the destructor for this type cannot be evaluated in constants 85 86error: aborting due to 10 previous errors 87 88Some errors have detailed explanations: E0493, E0716. 89For more information about an error, try `rustc --explain E0493`. 90