1 error[E0493]: destructor of `WithDtor` cannot be evaluated at compile-time
2 --> $DIR/static-drop-scope.rs:7:60
4 LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
5 | ^^^^^^^^- value is dropped here
7 | the destructor for this type cannot be evaluated in statics
9 error[E0716]: temporary value dropped while borrowed
10 --> $DIR/static-drop-scope.rs:7:60
12 LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
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`
19 error[E0493]: destructor of `WithDtor` cannot be evaluated at compile-time
20 --> $DIR/static-drop-scope.rs:11:59
22 LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
23 | ^^^^^^^^- value is dropped here
25 | the destructor for this type cannot be evaluated in constants
27 error[E0716]: temporary value dropped while borrowed
28 --> $DIR/static-drop-scope.rs:11:59
30 LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
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`
37 error[E0493]: destructor of `(WithDtor, i32)` cannot be evaluated at compile-time
38 --> $DIR/static-drop-scope.rs:15:28
40 LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1;
41 | ^^^^^^^^^^^^^ - value is dropped here
43 | the destructor for this type cannot be evaluated in statics
45 error[E0493]: destructor of `(WithDtor, i32)` cannot be evaluated at compile-time
46 --> $DIR/static-drop-scope.rs:18:27
48 LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1;
49 | ^^^^^^^^^^^^^ - value is dropped here
51 | the destructor for this type cannot be evaluated in constants
53 error[E0493]: destructor of `T` cannot be evaluated at compile-time
54 --> $DIR/static-drop-scope.rs:21:24
56 LL | const fn const_drop<T>(_: T) {}
57 | ^ - value is dropped here
59 | the destructor for this type cannot be evaluated in constant functions
61 error[E0493]: destructor of `(T, ())` cannot be evaluated at compile-time
62 --> $DIR/static-drop-scope.rs:25:5
65 | ^^^^^^^ the destructor for this type cannot be evaluated in constant functions
68 | - value is dropped here
70 error[E0493]: destructor of `(Option<WithDtor>, i32)` cannot be evaluated at compile-time
71 --> $DIR/static-drop-scope.rs:29:34
73 LL | const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1;
74 | ^^^^^^^^^^^^^^^^^^^ - value is dropped here
76 | the destructor for this type cannot be evaluated in constants
78 error[E0493]: destructor of `(Option<WithDtor>, i32)` cannot be evaluated at compile-time
79 --> $DIR/static-drop-scope.rs:34:43
81 LL | const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1;
82 | ^^^^^^^^^^^ - value is dropped here
84 | the destructor for this type cannot be evaluated in constants
86 error: aborting due to 10 previous errors
88 Some errors have detailed explanations: E0493, E0716.
89 For more information about an error, try `rustc --explain E0493`.