Open
Description
library/alloc/src/ffi/c_str.rs
has:
#[cfg(not(test))]
#[stable(feature = "box_from_c_str", since = "1.17.0")]
impl From<&CStr> for Box<CStr> {
As far as I can tell, #[cfg(not(test))]
is a workaround for something like #87534, as evidenced by error messages like:
note: the crate `alloc` is compiled multiple times, possibly with different configurations
alloc
is being compiled a second time as part of tests, and the two compilations are conflicting.
-
This workaround shouldn't be necessary.
-
This should be much better documented, so it doesn't send people on multi-hour debugging adventures when they try to write new trait impls in
alloc
.
Metadata
Metadata
Assignees
Labels
Area: Documentation for any part of the project, including the compiler, standard library, and toolsCategory: This is a bug.Call for partcipation: This issues needs some investigation to determine current statusRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the compiler team, which will review and decide on the PR/issue.