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:
@@ -133,14 +133,16 @@ extern crate core;
|
||||
#[cfg(test)] pub use ops = realstd::ops;
|
||||
#[cfg(test)] pub use cmp = realstd::cmp;
|
||||
#[cfg(test)] pub use ty = realstd::ty;
|
||||
#[cfg(test)] pub use owned = realstd::owned;
|
||||
#[cfg(not(stage0), test)] pub use owned = realstd::owned;
|
||||
|
||||
#[cfg(not(test))] pub use cmp = core::cmp;
|
||||
#[cfg(not(test))] pub use kinds = core::kinds;
|
||||
#[cfg(not(test))] pub use ops = core::ops;
|
||||
#[cfg(not(test))] pub use owned = core::owned;
|
||||
#[cfg(not(test))] pub use ty = core::ty;
|
||||
|
||||
#[cfg(stage0, test)] pub use owned = realstd::owned;
|
||||
#[cfg(stage0, not(test))] pub use owned = core::owned;
|
||||
|
||||
pub use core::any;
|
||||
pub use core::bool;
|
||||
pub use core::cell;
|
||||
@@ -207,6 +209,8 @@ pub mod ascii;
|
||||
|
||||
pub mod rc;
|
||||
pub mod gc;
|
||||
#[cfg(not(stage0), not(test))]
|
||||
pub mod owned;
|
||||
|
||||
/* Common traits */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user