blob: ce1582393703a3d07475cffb8a44285c65087510 [file] [log] [blame]
error[E0493]: destructors cannot be evaluated at compile-time
--> $DIR/static-drop-scope.rs:19:60
|
LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
| ^^^^^^^^ statics cannot evaluate destructors
error[E0597]: borrowed value does not live long enough
--> $DIR/static-drop-scope.rs:19:60
|
LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
| ^^^^^^^^- temporary value only lives until here
| |
| temporary value does not live long enough
|
= note: borrowed value must be valid for the static lifetime...
error[E0493]: destructors cannot be evaluated at compile-time
--> $DIR/static-drop-scope.rs:23:59
|
LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
| ^^^^^^^^ constants cannot evaluate destructors
error[E0597]: borrowed value does not live long enough
--> $DIR/static-drop-scope.rs:23:59
|
LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
| ^^^^^^^^- temporary value only lives until here
| |
| temporary value does not live long enough
|
= note: borrowed value must be valid for the static lifetime...
error[E0493]: destructors cannot be evaluated at compile-time
--> $DIR/static-drop-scope.rs:27:28
|
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:30:27
|
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:33:24
|
LL | const fn const_drop<T>(_: T) {}
| ^ constant functions cannot evaluate destructors
error[E0493]: destructors cannot be evaluated at compile-time
--> $DIR/static-drop-scope.rs:37:5
|
LL | (x, ()).1
| ^^^^^^^ constant functions cannot evaluate destructors
error: aborting due to 8 previous errors
Some errors occurred: E0493, E0597.
For more information about an error, try `rustc --explain E0493`.