From 682a007d24ada56f2455b69a6977f780fca15d80 Mon Sep 17 00:00:00 2001 From: Cristian Kubis Date: Fri, 10 Jul 2015 09:40:44 +0200 Subject: [PATCH 1/4] doc: set playground to nightly for unstable code --- src/librustdoc/html/static/playpen.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/playpen.js b/src/librustdoc/html/static/playpen.js index ff947d93fca..b7a5f202629 100644 --- a/src/librustdoc/html/static/playpen.js +++ b/src/librustdoc/html/static/playpen.js @@ -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) { @@ -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); From da03fc68acc89c9ef949e2253c8c0f5d38340bdd Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Fri, 10 Jul 2015 14:50:35 +0200 Subject: [PATCH 2/4] Small tweaks for the documentation of the primitive type array --- src/libstd/array.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstd/array.rs b/src/libstd/array.rs index e79e5d5a680..0dfcc72e379 100644 --- a/src/libstd/array.rs +++ b/src/libstd/array.rs @@ -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 @@ -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]; @@ -49,7 +51,5 @@ //! //! ``` //! -//! Rust does not currently support generics over the size of an array type. -//! #![doc(primitive = "array")] From e6d3780e229b2388c2d6d67aae75243fe27f68a5 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 10 Jul 2015 10:41:55 -0700 Subject: [PATCH 3/4] Upgrade rust-installer. Fixes install on Fedora-based Linuxes. --- src/rust-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rust-installer b/src/rust-installer index 0da191a30ba..c37d3747da7 160000 --- a/src/rust-installer +++ b/src/rust-installer @@ -1 +1 @@ -Subproject commit 0da191a30ba385215c5eb1dc97c2b5f076f93b07 +Subproject commit c37d3747da75c280237dc2d6b925078e69555499 From 25097023141ade95d0eedf192ac8eeacc3f67d5c Mon Sep 17 00:00:00 2001 From: Wei-Ming Yang Date: Sat, 11 Jul 2015 03:50:32 +0800 Subject: [PATCH 4/4] Update boxed.rs fix typos --- src/liballoc/boxed.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index c941629b871..3dfd10f0916 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -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; /// @@ -162,7 +162,7 @@ impl Box { /// /// # Examples /// ``` -/// # #![feature(box_raw)] +/// #![feature(box_raw)] /// use std::boxed; /// /// let seventeen = Box::new(17u32);