std: Move the owned module from core to std
The compiler was updated to recognize that implementations for ty_uniq(..) are allowed if the Box lang item is located in the current crate. This enforces the idea that libcore cannot allocated, and moves all related trait implementations from libcore to libstd. This is a breaking change in that the AnyOwnExt trait has moved from the any module to the owned module. Any previous users of std::any::AnyOwnExt should now use std::owned::AnyOwnExt instead. This was done because the trait is intended for Box traits and only Box traits. [breaking-change]
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
#[cfg(test)] pub use cmp = realcore::cmp;
|
||||
#[cfg(test)] pub use kinds = realcore::kinds;
|
||||
#[cfg(test)] pub use ops = realcore::ops;
|
||||
#[cfg(test)] pub use owned = realcore::owned;
|
||||
#[cfg(test)] pub use ty = realcore::ty;
|
||||
|
||||
#[cfg(not(test))]
|
||||
@@ -73,7 +72,6 @@ pub mod ptr;
|
||||
#[cfg(not(test))] pub mod ops;
|
||||
#[cfg(not(test))] pub mod ty;
|
||||
#[cfg(not(test))] pub mod cmp;
|
||||
#[cfg(not(test))] pub mod owned;
|
||||
pub mod clone;
|
||||
pub mod default;
|
||||
pub mod container;
|
||||
@@ -95,6 +93,9 @@ pub mod slice;
|
||||
pub mod str;
|
||||
pub mod tuple;
|
||||
|
||||
#[cfg(stage0, not(test))]
|
||||
pub mod owned;
|
||||
|
||||
mod failure;
|
||||
|
||||
// FIXME: this module should not exist. Once owned allocations are no longer a
|
||||
|
||||
Reference in New Issue
Block a user