about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-05-20 06:03:58 +0000
committerbors <bors@rust-lang.org>2015-05-20 06:03:58 +0000
commit720735b9430f7ff61761f54587b82dab45317938 (patch)
tree754ea7e9468553120c3d9665840e165ddac53129 /src/liballoc
parentf6b446f4a9147cf75a4554bbc1bef22698d8e263 (diff)
parent93701b399b2d3cbb056c1eaaf1fba421585bb2bd (diff)
downloadrust-720735b9430f7ff61761f54587b82dab45317938.tar.gz
rust-720735b9430f7ff61761f54587b82dab45317938.zip
Auto merge of #25588 - bluss:doc-string-from, r=alexcrichton
Use stable code in doc examples (libcollections)

Main task is to change from String::from_str to String::from in examples for String
(the latter constructor is stable). While I'm at it, also remove redundant feature flags,
fix some other instances of unstable code in examples (in examples for stable
methods), and remove some use of usize in examples too.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/rc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index b8d8e6ad0a1..1d783ed8d36 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -32,7 +32,7 @@
 //! and have the `Owner` remain allocated as long as any `Gadget` points at it.
 //!
 //! ```rust
-//! # #![feature(alloc, collections)]
+//! # #![feature(alloc)]
 //! use std::rc::Rc;
 //!
 //! struct Owner {
@@ -49,7 +49,7 @@
 //! fn main() {
 //!     // Create a reference counted Owner.
 //!     let gadget_owner : Rc<Owner> = Rc::new(
-//!             Owner { name: String::from_str("Gadget Man") }
+//!             Owner { name: String::from("Gadget Man") }
 //!     );
 //!
 //!     // Create Gadgets belonging to gadget_owner. To increment the reference