rollup merge of #23598: brson/gate

Conflicts:
	src/compiletest/compiletest.rs
	src/libcollections/lib.rs
	src/librustc_back/lib.rs
	src/libserialize/lib.rs
	src/libstd/lib.rs
	src/libtest/lib.rs
	src/test/run-make/rustdoc-default-impl/foo.rs
	src/test/run-pass/env-home-dir.rs
This commit is contained in:
Alex Crichton
2015-03-23 15:13:15 -07:00
1839 changed files with 4533 additions and 304 deletions

View File

@@ -95,6 +95,7 @@ use heap::deallocate;
/// task.
///
/// ```
/// # #![feature(alloc, core)]
/// use std::sync::Arc;
/// use std::thread;
///
@@ -185,6 +186,7 @@ impl<T> Arc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::sync::Arc;
///
/// let five = Arc::new(5);
@@ -246,6 +248,7 @@ impl<T> Clone for Arc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::sync::Arc;
///
/// let five = Arc::new(5);
@@ -289,6 +292,7 @@ impl<T: Send + Sync + Clone> Arc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::sync::Arc;
///
/// let mut five = Arc::new(5);
@@ -324,6 +328,7 @@ impl<T: Sync + Send> Drop for Arc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::sync::Arc;
///
/// {
@@ -387,6 +392,7 @@ impl<T: Sync + Send> Weak<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::sync::Arc;
///
/// let five = Arc::new(5);
@@ -424,6 +430,7 @@ impl<T: Sync + Send> Clone for Weak<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::sync::Arc;
///
/// let weak_five = Arc::new(5).downgrade();
@@ -448,6 +455,7 @@ impl<T: Sync + Send> Drop for Weak<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::sync::Arc;
///
/// {

View File

@@ -65,6 +65,7 @@ use core::raw::TraitObject;
/// The following two examples are equivalent:
///
/// ```
/// # #![feature(alloc)]
/// #![feature(box_syntax)]
/// use std::boxed::HEAP;
///
@@ -135,6 +136,7 @@ impl<T : ?Sized> Box<T> {
///
/// # Examples
/// ```
/// # #![feature(alloc)]
/// use std::boxed;
///
/// let seventeen = Box::new(17u32);
@@ -178,6 +180,7 @@ impl<T: Clone> Clone for Box<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc, core)]
/// let x = Box::new(5);
/// let mut y = Box::new(10);
///

View File

@@ -66,6 +66,7 @@
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/")]
#![doc(test(no_crate_inject))]
#![feature(no_std)]
#![no_std]

View File

@@ -32,6 +32,7 @@
//! and have the `Owner` remain allocated as long as any `Gadget` points at it.
//!
//! ```rust
//! # #![feature(alloc, collections)]
//! use std::rc::Rc;
//!
//! struct Owner {
@@ -88,6 +89,7 @@
//! Read the `Cell` documentation for more details on interior mutability.
//!
//! ```rust
//! # #![feature(alloc)]
//! use std::rc::Rc;
//! use std::rc::Weak;
//! use std::cell::RefCell;
@@ -218,6 +220,7 @@ impl<T> Rc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc::Rc;
///
/// let five = Rc::new(5);
@@ -247,6 +250,7 @@ pub fn strong_count<T>(this: &Rc<T>) -> usize { this.strong() }
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc;
/// use std::rc::Rc;
///
@@ -267,6 +271,7 @@ pub fn is_unique<T>(rc: &Rc<T>) -> bool {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc::{self, Rc};
///
/// let x = Rc::new(3);
@@ -301,6 +306,7 @@ pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc::{self, Rc};
///
/// let mut x = Rc::new(3);
@@ -330,6 +336,7 @@ impl<T: Clone> Rc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc::Rc;
///
/// let mut five = Rc::new(5);
@@ -372,6 +379,7 @@ impl<T> Drop for Rc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc::Rc;
///
/// {
@@ -420,6 +428,7 @@ impl<T> Clone for Rc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc::Rc;
///
/// let five = Rc::new(5);
@@ -648,6 +657,7 @@ impl<T> Weak<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc::Rc;
///
/// let five = Rc::new(5);
@@ -676,6 +686,7 @@ impl<T> Drop for Weak<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc::Rc;
///
/// {
@@ -721,6 +732,7 @@ impl<T> Clone for Weak<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::rc::Rc;
///
/// let weak_five = Rc::new(5).downgrade();