diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/build.rs | 1 | ||||
| -rw-r--r-- | src/libstd/collections/hash/table.rs | 6 | ||||
| -rw-r--r-- | src/libstd/thread/mod.rs | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/build.rs b/src/libstd/build.rs index 2abd47ab8df..0b5c2db171d 100644 --- a/src/libstd/build.rs +++ b/src/libstd/build.rs @@ -45,6 +45,7 @@ fn main() { println!("cargo:rustc-link-lib=socket"); println!("cargo:rustc-link-lib=posix4"); println!("cargo:rustc-link-lib=pthread"); + println!("cargo:rustc-link-lib=resolv"); } else if target.contains("apple-darwin") { println!("cargo:rustc-link-lib=System"); diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index 06f4f7643ec..3844690860b 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -44,7 +44,7 @@ impl TaggedHashUintPtr { #[inline] unsafe fn new(ptr: *mut HashUint) -> Self { debug_assert!(ptr as usize & 1 == 0 || ptr as usize == EMPTY as usize); - TaggedHashUintPtr(Unique::new(ptr)) + TaggedHashUintPtr(Unique::new_unchecked(ptr)) } #[inline] @@ -56,7 +56,7 @@ impl TaggedHashUintPtr { } else { usize_ptr &= !1; } - self.0 = Unique::new(usize_ptr as *mut HashUint) + self.0 = Unique::new_unchecked(usize_ptr as *mut HashUint) } } @@ -877,7 +877,7 @@ impl<K, V> RawTable<K, V> { elems_left: elems_left, marker: marker::PhantomData, }, - table: unsafe { Shared::new(self) }, + table: Shared::from(self), marker: marker::PhantomData, } } diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index c35676f2709..2ae62f8c3e0 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -413,7 +413,7 @@ impl Builder { /// *by value* from the thread where it is spawned to the new thread. Its /// return value will need to be passed from the new thread to the thread /// where it is `join`ed. -/// As a reminder, the [`Send`] marker trait, expresses that it is safe to be +/// As a reminder, the [`Send`] marker trait expresses that it is safe to be /// passed from thread to thread. [`Sync`] expresses that it is safe to have a /// reference be passed from thread to thread. /// |
