From fdb2837bd90ea3a7209cfe56a8f99b37b4f6b373 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 2 Jun 2017 10:59:19 -0700 Subject: [PATCH 1/5] Vec is pronounced 'vec' --- src/libcollections/vec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 3ef8438bc0bd2..2de27725e956c 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -9,7 +9,7 @@ // except according to those terms. //! A contiguous growable array type with heap-allocated contents, written -//! `Vec` but pronounced 'vector.' +//! `Vec`. //! //! Vectors have `O(1)` indexing, amortized `O(1)` push (to the end) and //! `O(1)` pop (from the end). From dd23fda9bd6c79ef8e0a389622352759dc159b15 Mon Sep 17 00:00:00 2001 From: Clar Charr Date: Tue, 30 May 2017 00:17:11 -0400 Subject: [PATCH 2/5] Make rustdoc.js use license comments. --- src/librustdoc/html/static/main.js | 20 +++++++++++--------- src/tools/tidy/src/style.rs | 4 +++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 53e341226af3e..38f83687d1d85 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -1,12 +1,14 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. +/*! + * Copyright 2014 The Rust Project Developers. See the COPYRIGHT + * file at the top-level directory of this distribution and at + * http://rust-lang.org/COPYRIGHT. + * + * Licensed under the Apache License, Version 2.0 or the MIT license + * , at your + * option. This file may not be copied, modified, or distributed + * except according to those terms. + */ /*jslint browser: true, es5: true */ /*globals $: true, rootPath: true */ diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 8bf683de8704a..35073b63723d4 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -169,8 +169,10 @@ fn licenseck(file: &Path, contents: &str) -> bool { lines.windows(LICENSE.lines().count()).any(|window| { let offset = if window.iter().all(|w| w.starts_with("//")) { 2 - } else if window.iter().all(|w| w.starts_with("#")) { + } else if window.iter().all(|w| w.starts_with('#')) { 1 + } else if window.iter().all(|w| w.starts_with(" *")) { + 2 } else { return false }; From 70e48b12e9ed06cc500061b9026aac9ea598a1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ty=C3=A1s=20Mustoha?= Date: Thu, 8 Jun 2017 12:03:08 +0200 Subject: [PATCH 3/5] Ignore variadic FFI test on AArch64 --- src/test/compile-fail/variadic-ffi.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/compile-fail/variadic-ffi.rs b/src/test/compile-fail/variadic-ffi.rs index 125177efc53c7..f245306f4d8f6 100644 --- a/src/test/compile-fail/variadic-ffi.rs +++ b/src/test/compile-fail/variadic-ffi.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-arm stdcall isn't suppported +// ignore-aarch64 stdcall isn't suppported extern "stdcall" { fn printf(_: *const u8, ...); //~ ERROR: variadic function must have C or cdecl calling From c288864ed0b83f58183a9ddc53d02d36eac29287 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 8 Jun 2017 22:46:11 +0200 Subject: [PATCH 4/5] doc: a more complete explanation, and a better example --- src/libcore/cell.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index ea480f38947f9..e75401f6ce031 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -391,17 +391,17 @@ impl Cell { } } - /// Replaces the contained value. + /// Replaces the contained value, and returns it. /// /// # Examples /// /// ``` /// use std::cell::Cell; /// - /// let c = Cell::new(5); - /// let old = c.replace(10); - /// - /// assert_eq!(5, old); + /// let cell = Cell::new(5); + /// assert_eq!(cell.get(), 5); + /// assert_eq!(cell.replace(10), 5); + /// assert_eq!(cell.get(), 10); /// ``` #[stable(feature = "move_cell", since = "1.17.0")] pub fn replace(&self, val: T) -> T { From 09ac478c5c33bb99055c88fb36d7229baae92762 Mon Sep 17 00:00:00 2001 From: Fuqiao Xue Date: Fri, 9 Jun 2017 13:37:22 +0800 Subject: [PATCH 5/5] Update TRPL link in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dbb5bf9ce38d6..0b209fd3e9492 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ standard library, and documentation. ## Quick Start -Read ["Installing Rust"] from [The Book]. +Read ["Installation"] from [The Book]. -["Installing Rust"]: https://doc.rust-lang.org/book/getting-started.html#installing-rust +["Installation"]: https://doc.rust-lang.org/book/second-edition/ch01-01-installation.html [The Book]: https://doc.rust-lang.org/book/index.html ## Building from Source