While trying to do something about bug #39798 I added a use of sync::once
to libstd/net/test.rs
, after which, running x.py test src/libstd --stage 0
produces very strange errors:
error[E0603]: module `once` is private
--> src/libstd/net/test.rs:16:18
|
16 | use sync::once::{Once, ONCE_INIT};
| ^^^^
error[E0603]: module `once` is private
--> src/libstd/net/test.rs:16:24
|
16 | use sync::once::{Once, ONCE_INIT};
| ^^^^^^^^^
error: the #[global_allocator] in this crate conflicts with global allocator in: std
error: aborting due to 3 previous errors
error: Could not compile `std`.
I don’t see why it thinks std::sync::once
is private - inside std, even - and I also don’t see how std
's choice of global allocator can possibly conflict with itself. Anyone have a clue?
EDIT: If I use --stage 1
instead, the complaint about the global allocator goes away, but the other errors don’t.