about summary refs log tree commit diff
path: root/src/libcore/fmt
diff options
context:
space:
mode:
authorP1start <rewi-github@whanau.org>2015-04-23 22:53:54 +1200
committerP1start <rewi-github@whanau.org>2015-05-02 10:03:35 +1200
commit57d8289754767e046a01abaab6054b7146c51f74 (patch)
tree48a7cfe6525cdc6d0c5431e982cc3de0b1bd2aaa /src/libcore/fmt
parent5c710b593b429d39ea01375172a9ce968f43ab26 (diff)
downloadrust-57d8289754767e046a01abaab6054b7146c51f74.tar.gz
rust-57d8289754767e046a01abaab6054b7146c51f74.zip
Make `UnsafeCell`, `RefCell`, `Mutex`, and `RwLock` accept DSTs
This + DST coercions (#24619) would allow code like `Rc<RefCell<Box<Trait>>>` to
be simplified to `Rc<RefCell<Trait>>`.
Diffstat (limited to 'src/libcore/fmt')
-rw-r--r--src/libcore/fmt/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 73778bfd038..f8a1ef96bcc 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -1062,7 +1062,7 @@ impl<T: Copy + Debug> Debug for Cell<T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: Debug> Debug for RefCell<T> {
+impl<T: ?Sized + Debug> Debug for RefCell<T> {
     fn fmt(&self, f: &mut Formatter) -> Result {
         match self.borrow_state() {
             BorrowState::Unused | BorrowState::Reading => {
@@ -1074,14 +1074,14 @@ impl<T: Debug> Debug for RefCell<T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'b, T: Debug> Debug for Ref<'b, T> {
+impl<'b, T: ?Sized + Debug> Debug for Ref<'b, T> {
     fn fmt(&self, f: &mut Formatter) -> Result {
         Debug::fmt(&**self, f)
     }
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'b, T: Debug> Debug for RefMut<'b, T> {
+impl<'b, T: ?Sized + Debug> Debug for RefMut<'b, T> {
     fn fmt(&self, f: &mut Formatter) -> Result {
         Debug::fmt(&*(self.deref()), f)
     }