-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tricky error with rustc-std-workspace-core
crate.
#64356
Comments
If i add this to lib.rs:
There'll be extra error:
|
Why are you using I believe what you're finding is that you've overridden core crate with what is essentially an empty crate which is not going to contain Clone appropriately... |
i'm trying to add these dependencies to the crate |
See e.g. how libc does it for a working example. https://github.com/rust-lang/libc/blob/master/src/lib.rs#L41 You'll only want to replace core with rustc-std-workspace-core if a rustc-dep-of-std feature is set or so |
https://github.com/unicode-rs/unicode-width/blob/master/Cargo.toml#L22 extern crate core;
pub use core::*; |
Hm can you explain why it's necessary? The |
I just think it might be a little strange if the most important crates in the ecosystem has an optional dependency that's causing compilation errors when enabled~ Maybe it's not a must. but if the |
@crlf0710 you are not supposed to use it directly or have it enabled by default. |
I'm going to close this as won't fix. |
I'm not very sure whether this is a bug or not. But let me write down the reproduction steps. I'm using the newest stable.
Cargo.toml:
src/lib.rs
compiler output:
The
rustc-std-workspace-core
crate here is the one on crates.io. @alexcrichtonThe text was updated successfully, but these errors were encountered: