diff options
| author | bors <bors@rust-lang.org> | 2015-05-20 06:03:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-05-20 06:03:58 +0000 |
| commit | 720735b9430f7ff61761f54587b82dab45317938 (patch) | |
| tree | 754ea7e9468553120c3d9665840e165ddac53129 /src/liballoc | |
| parent | f6b446f4a9147cf75a4554bbc1bef22698d8e263 (diff) | |
| parent | 93701b399b2d3cbb056c1eaaf1fba421585bb2bd (diff) | |
| download | rust-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.rs | 4 |
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 |
