-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lang-itemArea: Language itemsArea: Language itemsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I'm currently porting crates to support no_std
to use them with https://github.com/baidu/rust-sgx-sdk
The Problem:
any sub-dependency can break no_std, resulting in an error like this:
error: duplicate lang item in crate `std`: `f32_runtime`.
|
= note: first defined in crate `sgx_tstd`.
error: duplicate lang item in crate `std`: `f64_runtime`.
|
= note: first defined in crate `sgx_tstd`.
error: duplicate lang item in crate `std`: `panic_impl`.
|
= note: first defined in crate `sgx_tstd`.
error: duplicate lang item in crate `std`: `oom`.
|
= note: first defined in crate `sgx_trts`.
The compiler doesn't give me any hint, which (sub)dependency causes this issue. Like this it is very annoying and time-consuming to sort out such errors.
Would it be possible that rustc gives us a hint to colliding crates?
Maybe something like https://github.com/sfackler/cargo-tree could help visualizing no_std crates automatically?
elichai, prestonvanloon, Robbepop, laizy and tomtau
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lang-itemArea: Language itemsArea: Language itemsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.