diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-04-02 00:40:38 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-04-02 00:40:38 +0530 |
| commit | 9eb0bab9dee6e650ce6f9e01f0e3eb22ca302790 (patch) | |
| tree | 7563298341e5828d924b91686298b9bdfc2172e9 /src/liballoc | |
| parent | abd747cd153c1ef3648831916017fb692200387d (diff) | |
| parent | 15b58fedcacba7d10a9f7d460a83da645a09ad3e (diff) | |
| download | rust-9eb0bab9dee6e650ce6f9e01f0e3eb22ca302790.tar.gz rust-9eb0bab9dee6e650ce6f9e01f0e3eb22ca302790.zip | |
Rollup merge of #23867 - nikomatsakis:issue-23086-take-3, r=pnkfelix
This PR implements rust-lang/rfcs#1023. In the process it fixes #23086 and #23516. A few impls in libcore had to be updated, but the impact is generally pretty minimal. Most of the fallout is in the tests that probed the limits of today's coherence. I tested and we were able to build the most popular crates along with iron (modulo errors around errors being sendable). Fixes #23918.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/boxed.rs | 8 | ||||
| -rw-r--r-- | src/liballoc/boxed_test.rs | 8 | ||||
| -rw-r--r-- | src/liballoc/lib.rs | 2 |
3 files changed, 7 insertions, 11 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 550b25ac3a7..c4541e34cdb 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -86,6 +86,7 @@ pub static HEAP: () = (); /// See the [module-level documentation](../../std/boxed/index.html) for more. #[lang = "owned_box"] #[stable(feature = "rust1", since = "1.0.0")] +#[fundamental] pub struct Box<T>(Unique<T>); impl<T> Box<T> { @@ -278,13 +279,6 @@ impl<T: fmt::Debug + ?Sized> fmt::Debug for Box<T> { } #[stable(feature = "rust1", since = "1.0.0")] -impl fmt::Debug for Box<Any> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("Box<Any>") - } -} - -#[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> Deref for Box<T> { type Target = T; diff --git a/src/liballoc/boxed_test.rs b/src/liballoc/boxed_test.rs index 682d5f407c4..fc44ac4eac6 100644 --- a/src/liballoc/boxed_test.rs +++ b/src/liballoc/boxed_test.rs @@ -55,17 +55,17 @@ fn test_show() { let b = Box::new(Test) as Box<Any>; let a_str = format!("{:?}", a); let b_str = format!("{:?}", b); - assert_eq!(a_str, "Box<Any>"); - assert_eq!(b_str, "Box<Any>"); + assert_eq!(a_str, "Any"); + assert_eq!(b_str, "Any"); static EIGHT: usize = 8; static TEST: Test = Test; let a = &EIGHT as &Any; let b = &TEST as &Any; let s = format!("{:?}", a); - assert_eq!(s, "&Any"); + assert_eq!(s, "Any"); let s = format!("{:?}", b); - assert_eq!(s, "&Any"); + assert_eq!(s, "Any"); } #[test] diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index b92dfa9117e..a8be63d6373 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -71,6 +71,8 @@ #![feature(no_std)] #![no_std] #![feature(allocator)] +#![feature(custom_attribute)] +#![feature(fundamental)] #![feature(lang_items, unsafe_destructor)] #![feature(box_syntax)] #![feature(optin_builtin_traits)] |
