1 error[E0493]: destructors cannot be evaluated at compile-time
2 --> $DIR/static-drop-scope.rs:19:60
4 LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
5 | ^^^^^^^^ statics cannot evaluate destructors
7 error[E0716]: temporary value dropped while borrowed
8 --> $DIR/static-drop-scope.rs:19:60
10 LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
11 | ^^^^^^^^- temporary value is freed at the end of this statement
13 | creates a temporary which is freed while still in use
15 = note: borrowed value must be valid for the static lifetime...
17 error[E0493]: destructors cannot be evaluated at compile-time
18 --> $DIR/static-drop-scope.rs:23:59
20 LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
21 | ^^^^^^^^ constants cannot evaluate destructors
23 error[E0716]: temporary value dropped while borrowed
24 --> $DIR/static-drop-scope.rs:23:59
26 LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
27 | ^^^^^^^^- temporary value is freed at the end of this statement
29 | creates a temporary which is freed while still in use
31 = note: borrowed value must be valid for the static lifetime...
33 error[E0493]: destructors cannot be evaluated at compile-time
34 --> $DIR/static-drop-scope.rs:27:28
36 LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1;
37 | ^^^^^^^^^^^^^ statics cannot evaluate destructors
39 error[E0493]: destructors cannot be evaluated at compile-time
40 --> $DIR/static-drop-scope.rs:30:27
42 LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1;
43 | ^^^^^^^^^^^^^ constants cannot evaluate destructors
45 error[E0493]: destructors cannot be evaluated at compile-time
46 --> $DIR/static-drop-scope.rs:33:24
48 LL | const fn const_drop<T>(_: T) {}
49 | ^ constant functions cannot evaluate destructors
51 error[E0493]: destructors cannot be evaluated at compile-time
52 --> $DIR/static-drop-scope.rs:37:5
55 | ^^^^^^^ constant functions cannot evaluate destructors
57 error: aborting due to 8 previous errors
59 Some errors occurred: E0493, E0716.
60 For more information about an error, try `rustc --explain E0493`.