| error[E0493]: destructor of `(WithDtor, i32)` cannot be evaluated at compile-time | |
| --> $DIR/static-drop-scope.rs:7:28 | |
| | | |
| LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1; | |
| | ^^^^^^^^^^^^^ - value is dropped here | |
| | | | |
| | the destructor for this type cannot be evaluated in statics | |
| error[E0493]: destructor of `(WithDtor, i32)` cannot be evaluated at compile-time | |
| --> $DIR/static-drop-scope.rs:10:27 | |
| | | |
| LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1; | |
| | ^^^^^^^^^^^^^ - value is dropped here | |
| | | | |
| | the destructor for this type cannot be evaluated in constants | |
| error[E0493]: destructor of `(Option<WithDtor>, i32)` cannot be evaluated at compile-time | |
| --> $DIR/static-drop-scope.rs:21:34 | |
| | | |
| LL | const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1; | |
| | ^^^^^^^^^^^^^^^^^^^ - value is dropped here | |
| | | | |
| | the destructor for this type cannot be evaluated in constants | |
| error[E0493]: destructor of `(Option<WithDtor>, i32)` cannot be evaluated at compile-time | |
| --> $DIR/static-drop-scope.rs:26:43 | |
| | | |
| LL | const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1; | |
| | ^^^^^^^^^^^ - value is dropped here | |
| | | | |
| | the destructor for this type cannot be evaluated in constants | |
| error[E0493]: destructor of `T` cannot be evaluated at compile-time | |
| --> $DIR/static-drop-scope.rs:13:24 | |
| | | |
| LL | const fn const_drop<T>(_: T) {} | |
| | ^ - value is dropped here | |
| | | | |
| | the destructor for this type cannot be evaluated in constant functions | |
| | | |
| help: consider restricting type parameter `T` with unstable trait `Destruct` | |
| | | |
| LL | const fn const_drop<T: [const] Destruct>(_: T) {} | |
| | ++++++++++++++++++ | |
| error[E0493]: destructor of `(T, ())` cannot be evaluated at compile-time | |
| --> $DIR/static-drop-scope.rs:17:5 | |
| | | |
| LL | (x, ()).1 | |
| | ^^^^^^^ the destructor for this type cannot be evaluated in constant functions | |
| LL | | |
| LL | } | |
| | - value is dropped here | |
| error: aborting due to 6 previous errors | |
| For more information about this error, try `rustc --explain E0493`. |