Skip to content

Rollup of 4 pull requests #26961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ use core::raw::{TraitObject};
/// The following two examples are equivalent:
///
/// ```
/// # #![feature(box_heap)]
/// #![feature(box_heap)]
/// #![feature(box_syntax)]
/// use std::boxed::HEAP;
///
Expand Down Expand Up @@ -162,7 +162,7 @@ impl<T : ?Sized> Box<T> {
///
/// # Examples
/// ```
/// # #![feature(box_raw)]
/// #![feature(box_raw)]
/// use std::boxed;
///
/// let seventeen = Box::new(17u32);
Expand Down
9 changes: 8 additions & 1 deletion src/librustdoc/html/static/playpen.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ document.addEventListener('DOMContentLoaded', function() {
return;
}

var featureRegexp = new RegExp('^\s*#!\\[feature\\(\.*?\\)\\]');
var elements = document.querySelectorAll('pre.rust');

Array.prototype.forEach.call(elements, function(el) {
Expand All @@ -29,8 +30,14 @@ document.addEventListener('DOMContentLoaded', function() {
a.setAttribute('class', 'test-arrow');

var code = el.previousElementSibling.textContent;

var channel = '';
if (featureRegexp.test(code)) {
channel = '&version=nightly';
}

a.setAttribute('href', window.playgroundUrl + '?code=' +
encodeURIComponent(code));
encodeURIComponent(code) + channel);
a.setAttribute('target', '_blank');

el.appendChild(a);
Expand Down
8 changes: 4 additions & 4 deletions src/libstd/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

//! A fixed-size array is denoted `[T; N]` for the element type `T` and
//! the compile time constant size `N`. The size should be zero or positive.
//! the compile time constant size `N`. The size must be zero or positive.
//!
//! Arrays values are created either with an explicit expression that lists
//! each element: `[x, y, z]` or a repeat expression: `[x; N]`. The repeat
Expand All @@ -32,7 +32,9 @@
//!
//! [slice]: primitive.slice.html
//!
//! ## Examples
//! Rust does not currently support generics over the size of an array type.
//!
//! # Examples
//!
//! ```
//! let mut array: [i32; 3] = [0; 3];
Expand All @@ -49,7 +51,5 @@
//!
//! ```
//!
//! Rust does not currently support generics over the size of an array type.
//!

#![doc(primitive = "array")]
2 changes: 1 addition & 1 deletion src/rust-installer