diff options
| author | bors <bors@rust-lang.org> | 2015-02-10 19:52:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-10 19:52:04 +0000 |
| commit | bc87efef2cceaec99d30e809cac2b8d22b9e25fc (patch) | |
| tree | 1f59e50bc58a426615cc15594cade8b69f24bdbf /src/libcore/ptr.rs | |
| parent | 88d8ba5ab3b1d22288b021708c3d87464e43b880 (diff) | |
| parent | 3e10785e21b731d536cf9ad9b911e8261862bde7 (diff) | |
| download | rust-bc87efef2cceaec99d30e809cac2b8d22b9e25fc.tar.gz rust-bc87efef2cceaec99d30e809cac2b8d22b9e25fc.zip | |
Auto merge of #22153 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libcore/ptr.rs')
| -rw-r--r-- | src/libcore/ptr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index ba1eae551ff..bf801a88ca5 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -522,21 +522,21 @@ impl<T> PartialOrd for *mut T { /// Useful for building abstractions like `Vec<T>` or `Box<T>`, which /// internally use raw pointers to manage the memory that they own. #[unstable(feature = "core", reason = "recently added to this module")] -pub struct Unique<T>(pub *mut T); +pub struct Unique<T: ?Sized>(pub *mut T); /// `Unique` pointers are `Send` if `T` is `Send` because the data they /// reference is unaliased. Note that this aliasing invariant is /// unenforced by the type system; the abstraction using the /// `Unique` must enforce it. #[unstable(feature = "core", reason = "recently added to this module")] -unsafe impl<T:Send> Send for Unique<T> { } +unsafe impl<T: Send + ?Sized> Send for Unique<T> { } /// `Unique` pointers are `Sync` if `T` is `Sync` because the data they /// reference is unaliased. Note that this aliasing invariant is /// unenforced by the type system; the abstraction using the /// `Unique` must enforce it. #[unstable(feature = "core", reason = "recently added to this module")] -unsafe impl<T:Sync> Sync for Unique<T> { } +unsafe impl<T: Sync + ?Sized> Sync for Unique<T> { } impl<T> Unique<T> { /// Returns a null Unique. |
