Skip to content

Commit f6dd25b

Browse files
committed
rollup merge of #21713: alexcrichton/second-pass-fmt
2 parents 8397217 + 6227357 commit f6dd25b

File tree

21 files changed

+379
-349
lines changed

21 files changed

+379
-349
lines changed

src/liballoc/arc.rs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,22 @@
1212

1313
//! Threadsafe reference-counted boxes (the `Arc<T>` type).
1414
//!
15-
//! The `Arc<T>` type provides shared ownership of an immutable value. Destruction is
16-
//! deterministic, and will occur as soon as the last owner is gone. It is marked as `Send` because
17-
//! it uses atomic reference counting.
15+
//! The `Arc<T>` type provides shared ownership of an immutable value.
16+
//! Destruction is deterministic, and will occur as soon as the last owner is
17+
//! gone. It is marked as `Send` because it uses atomic reference counting.
1818
//!
19-
//! If you do not need thread-safety, and just need shared ownership, consider the [`Rc<T>`
20-
//! type](../rc/struct.Rc.html). It is the same as `Arc<T>`, but does not use atomics, making it
21-
//! both thread-unsafe as well as significantly faster when updating the reference count.
19+
//! If you do not need thread-safety, and just need shared ownership, consider
20+
//! the [`Rc<T>` type](../rc/struct.Rc.html). It is the same as `Arc<T>`, but
21+
//! does not use atomics, making it both thread-unsafe as well as significantly
22+
//! faster when updating the reference count.
2223
//!
23-
//! The `downgrade` method can be used to create a non-owning `Weak<T>` pointer to the box. A
24-
//! `Weak<T>` pointer can be upgraded to an `Arc<T>` pointer, but will return `None` if the value
25-
//! has already been dropped.
24+
//! The `downgrade` method can be used to create a non-owning `Weak<T>` pointer
25+
//! to the box. A `Weak<T>` pointer can be upgraded to an `Arc<T>` pointer, but
26+
//! will return `None` if the value has already been dropped.
2627
//!
27-
//! For example, a tree with parent pointers can be represented by putting the nodes behind strong
28-
//! `Arc<T>` pointers, and then storing the parent pointers as `Weak<T>` pointers.
28+
//! For example, a tree with parent pointers can be represented by putting the
29+
//! nodes behind strong `Arc<T>` pointers, and then storing the parent pointers
30+
//! as `Weak<T>` pointers.
2931
//!
3032
//! # Examples
3133
//!
@@ -87,8 +89,9 @@ use heap::deallocate;
8789
///
8890
/// # Example
8991
///
90-
/// In this example, a large vector of floats is shared between several tasks. With simple pipes,
91-
/// without `Arc`, a copy would have to be made for each task.
92+
/// In this example, a large vector of floats is shared between several tasks.
93+
/// With simple pipes, without `Arc`, a copy would have to be made for each
94+
/// task.
9295
///
9396
/// ```rust
9497
/// use std::sync::Arc;

src/libcollections/bit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,7 @@ impl BitvSet {
17381738
}
17391739
}
17401740

1741+
#[stable(feature = "rust1", since = "1.0.0")]
17411742
impl fmt::Debug for BitvSet {
17421743
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
17431744
try!(write!(fmt, "BitvSet {{"));

src/libcollections/enum_set.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub struct EnumSet<E> {
3131

3232
impl<E> Copy for EnumSet<E> {}
3333

34+
#[stable(feature = "rust1", since = "1.0.0")]
3435
impl<E:CLike + fmt::Debug> fmt::Debug for EnumSet<E> {
3536
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
3637
try!(write!(fmt, "EnumSet {{"));

src/libcollections/string.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,11 +950,14 @@ impl FromStr for String {
950950
}
951951

952952
/// A generic trait for converting a value to a string
953+
#[stable(feature = "rust1", since = "1.0.0")]
953954
pub trait ToString {
954955
/// Converts the value of `self` to an owned string
956+
#[stable(feature = "rust1", since = "1.0.0")]
955957
fn to_string(&self) -> String;
956958
}
957959

960+
#[stable(feature = "rust1", since = "1.0.0")]
958961
impl<T: fmt::Display + ?Sized> ToString for T {
959962
#[inline]
960963
fn to_string(&self) -> String {
@@ -991,6 +994,7 @@ impl<'a> Str for CowString<'a> {
991994
}
992995
}
993996

997+
#[stable(feature = "rust1", since = "1.0.0")]
994998
impl fmt::Writer for String {
995999
#[inline]
9961000
fn write_str(&mut self, s: &str) -> fmt::Result {

src/libcollections/vec.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,13 +1591,6 @@ impl<T: fmt::Debug> fmt::Debug for Vec<T> {
15911591
}
15921592
}
15931593

1594-
impl<'a> fmt::Writer for Vec<u8> {
1595-
fn write_str(&mut self, s: &str) -> fmt::Result {
1596-
self.push_all(s.as_bytes());
1597-
Ok(())
1598-
}
1599-
}
1600-
16011594
////////////////////////////////////////////////////////////////////////////////
16021595
// Clone-on-write
16031596
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)