impl ... for Box<CoreType>
in alloc should not require #[cfg(not(test))]
#135100
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-bug
Category: This is a bug.
E-needs-investigation
Call for partcipation: This issues needs some investigation to determine current status
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
library/alloc/src/ffi/c_str.rs
has: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
.The text was updated successfully, but these errors were encountered: