Closed
Description
I tried this code:
// src/lib.rs is empty
env RUSTFLAGS='-C instrument-coverage -Z no-profiler-runtime' cargo build --target x86_64-unknown-linux
-gnu -Z build-std
I expected to see this happen: A successful build
Instead, this happened: error[E0493]: destructors cannot be evaluated at compile-time
while building core
$ env RUSTFLAGS='-C instrument-coverage -Z no-profiler-runtime' cargo build --target x86_64-unknown-linux-gnu -Z build-std
Compiling core v0.0.0 (/home/$USER/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
error[E0493]: destructors cannot be evaluated at compile-time
--> /home/$USER/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:1824:28
|
1824 | pub const fn transpose(self) -> Result<Option<T>, E> {
| ^^^^ constant functions cannot evaluate destructors
error[E0493]: destructors cannot be evaluated at compile-time
--> /home/$USER/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1654:28
|
1654 | pub const fn transpose(self) -> Option<Result<T, E>> {
| ^^^^ constant functions cannot evaluate destructors
For more information about this error, try `rustc --explain E0493`.
error: could not compile `core` due to 2 previous errors
Meta
rustc --version --verbose
:
rustc 1.60.0-nightly (e7aca8959 2022-02-09)
binary: rustc
commit-hash: e7aca895980f25f6d2d3c48e10fd04656764d1e4
commit-date: 2022-02-09
host: x86_64-unknown-linux-gnu
release: 1.60.0-nightly
LLVM version: 13.0.0