about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-03-15 07:58:27 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-03-17 13:28:53 -0700
commit1241a88fa9ddf5e645d1e6e93e04c435bbf15cd4 (patch)
tree987da130316d1be22082895a02b1adb6cb35e677
parenta8f4a1bd984091ffb8f87f9440e2483f94b44a20 (diff)
downloadrust-1241a88fa9ddf5e645d1e6e93e04c435bbf15cd4.tar.gz
rust-1241a88fa9ddf5e645d1e6e93e04c435bbf15cd4.zip
Minor fixups to fix tidy errors
-rw-r--r--src/liballoc/arc.rs5
-rw-r--r--src/libcollections/btree/map.rs2
-rw-r--r--src/libcollections/btree/set.rs7
-rw-r--r--src/libcollections/range.rs2
-rw-r--r--src/libcollectionstest/lib.rs2
-rw-r--r--src/libcore/ptr.rs3
-rw-r--r--src/libcoretest/lib.rs4
7 files changed, 9 insertions, 16 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index b6191c4d43e..1d616233881 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -332,7 +332,10 @@ impl<T> Arc<T> {
     pub unsafe fn from_raw(ptr: *const T) -> Self {
         // To find the corresponding pointer to the `ArcInner` we need to subtract the offset of the
         // `data` field from the pointer.
-        Arc { ptr: Shared::new((ptr as *const u8).offset(-offset_of!(ArcInner<T>, data)) as *const _) }
+        let ptr = (ptr as *const u8).offset(-offset_of!(ArcInner<T>, data));
+        Arc {
+            ptr: Shared::new(ptr as *const _),
+        }
     }
 }
 
diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs
index a746175a5e9..53fe6b4bc9f 100644
--- a/src/libcollections/btree/map.rs
+++ b/src/libcollections/btree/map.rs
@@ -338,6 +338,7 @@ pub struct ValuesMut<'a, K: 'a, V: 'a> {
 }
 
 /// An iterator over a sub-range of BTreeMap's entries.
+#[stable(feature = "btree_range", since = "1.17.0")]
 pub struct Range<'a, K: 'a, V: 'a> {
     front: Handle<NodeRef<marker::Immut<'a>, K, V, marker::Leaf>, marker::Edge>,
     back: Handle<NodeRef<marker::Immut<'a>, K, V, marker::Leaf>, marker::Edge>,
@@ -351,6 +352,7 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Range<'a, K, V>
 }
 
 /// A mutable iterator over a sub-range of BTreeMap's entries.
+#[stable(feature = "btree_range", since = "1.17.0")]
 pub struct RangeMut<'a, K: 'a, V: 'a> {
     front: Handle<NodeRef<marker::Mut<'a>, K, V, marker::Leaf>, marker::Edge>,
     back: Handle<NodeRef<marker::Mut<'a>, K, V, marker::Leaf>, marker::Edge>,
diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs
index e3c990c80de..72d25f87bca 100644
--- a/src/libcollections/btree/set.rs
+++ b/src/libcollections/btree/set.rs
@@ -113,6 +113,7 @@ pub struct IntoIter<T> {
 /// [`BTreeSet`]: struct.BTreeSet.html
 /// [`range`]: struct.BTreeSet.html#method.range
 #[derive(Debug)]
+#[stable(feature = "btree_range", since = "1.17.0")]
 pub struct Range<'a, T: 'a> {
     iter: ::btree_map::Range<'a, T, ()>,
 }
@@ -264,8 +265,6 @@ impl<T: Ord> BTreeSet<T> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(btree_range, collections_bound)]
-    ///
     /// use std::collections::BTreeSet;
     /// use std::collections::Bound::Included;
     ///
@@ -278,9 +277,7 @@ impl<T: Ord> BTreeSet<T> {
     /// }
     /// assert_eq!(Some(&5), set.range(4..).next());
     /// ```
-    #[unstable(feature = "btree_range",
-               reason = "matches collection reform specification, waiting for dust to settle",
-               issue = "27787")]
+    #[stable(feature = "btree_range", since = "1.17.0")]
     pub fn range<K: ?Sized, R>(&self, range: R) -> Range<T>
         where K: Ord, T: Borrow<K>, R: RangeArgument<K>
     {
diff --git a/src/libcollections/range.rs b/src/libcollections/range.rs
index e4b94a1d70e..31e4d001397 100644
--- a/src/libcollections/range.rs
+++ b/src/libcollections/range.rs
@@ -29,7 +29,6 @@ pub trait RangeArgument<T: ?Sized> {
     /// ```
     /// #![feature(collections)]
     /// #![feature(collections_range)]
-    /// #![feature(collections_bound)]
     ///
     /// extern crate collections;
     ///
@@ -52,7 +51,6 @@ pub trait RangeArgument<T: ?Sized> {
     /// ```
     /// #![feature(collections)]
     /// #![feature(collections_range)]
-    /// #![feature(collections_bound)]
     ///
     /// extern crate collections;
     ///
diff --git a/src/libcollectionstest/lib.rs b/src/libcollectionstest/lib.rs
index 98d0b1c8e15..618eb386c0f 100644
--- a/src/libcollectionstest/lib.rs
+++ b/src/libcollectionstest/lib.rs
@@ -13,11 +13,9 @@
 #![feature(binary_heap_extras)]
 #![feature(binary_heap_peek_mut_pop)]
 #![feature(box_syntax)]
-#![feature(btree_range)]
 #![feature(inclusive_range_syntax)]
 #![feature(collection_placement)]
 #![feature(collections)]
-#![feature(collections_bound)]
 #![feature(const_fn)]
 #![feature(exact_size_is_empty)]
 #![feature(pattern)]
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 15174e72795..909e44df20a 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -658,7 +658,6 @@ impl<T: ?Sized> Eq for *mut T {}
 /// # Examples
 ///
 /// ```
-/// #![feature(ptr_eq)]
 /// use std::ptr;
 ///
 /// let five = 5;
@@ -673,7 +672,7 @@ impl<T: ?Sized> Eq for *mut T {}
 /// assert!(ptr::eq(five_ref, same_five_ref));
 /// assert!(!ptr::eq(five_ref, other_five_ref));
 /// ```
-#[unstable(feature = "ptr_eq", reason = "newly added", issue = "36497")]
+#[stable(feature = "ptr_eq", since = "1.17.0")]
 #[inline]
 pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
     a == b
diff --git a/src/libcoretest/lib.rs b/src/libcoretest/lib.rs
index e06b757691e..d84a1e22756 100644
--- a/src/libcoretest/lib.rs
+++ b/src/libcoretest/lib.rs
@@ -23,7 +23,6 @@
 #![feature(nonzero)]
 #![feature(rand)]
 #![feature(raw)]
-#![feature(result_expect_err)]
 #![feature(sip_hash_13)]
 #![feature(slice_patterns)]
 #![feature(step_by)]
@@ -31,9 +30,6 @@
 #![feature(try_from)]
 #![feature(unicode)]
 #![feature(unique)]
-#![feature(ordering_chaining)]
-#![feature(ptr_unaligned)]
-#![feature(move_cell)]
 #![feature(fmt_internals)]
 
 extern crate core;