You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presumably this problem has been around for a while but for definiteness I picked today's nightly.
Make a folder with the following two files:
Cargo.toml
[package]
name = "test"edition = "2024"
[profile.dev]
panic = "abort"
[[bin]]
name = "test"path = "main.rs"
main.rs
pubfnmain(){}
Bash
rustup install nightly-2025-01-13
cargo build -Zbuild-std
Result
Compiling tmp v0.0.0 (/home/rchatham/Documents/programming/rust-wasm-eh-test-2)
error[E0152]: duplicate lang item in crate `core`: `sized`
|
= note: the lang item is first defined in crate `core` (which `std` depends on)
= note: first definition in `core` loaded from /home/rchatham/Documents/programming/rust-wasm-eh-test-2/target/wasm32-unknown-emscripten/debug/deps/libcore-05cdacbb5559ef58.rlib, /home/rchatham/Documents/programming/rust-wasm-eh-test-2/target/wasm32-unknown-emscripten/debug/deps/libcore-05cdacbb5559ef58.rmeta
= note: second definition in `core` loaded from /home/rchatham/.rustup/toolchains/nightly-2025-01-13-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-emscripten/lib/libcore-9c3bca22b80bc54a.rlib
For more information about this error, try `rustc --explain E0152`.
error: could not compile `test` (bin "test") due to 1 previous error
@weihanglo would you mind also renaming #7359 to the title of my issue? The title of #7359 includes the phrase "no-harness test" which is I think irrelevant to the bug.
Uh oh!
There was an error while loading. Please reload this page.
Problem
panic=abort
doesn't work with-Zbuild-std
.xref related issues:
rust-lang/wg-cargo-std-aware#29
#7359
This is probably the same issue as #7359. I am opening this as well because the reproduction is simpler. I get the same error when I try to use https://github.com/RalfJung/rustc-build-sysroot to build my own sysroot.
Steps
Presumably this problem has been around for a while but for definiteness I picked today's nightly.
Make a folder with the following two files:
Cargo.toml
main.rs
Bash
rustup install nightly-2025-01-13
cargo build -Zbuild-std
Result
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: