diff options
| author | bors <bors@rust-lang.org> | 2017-06-09 23:19:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-06-09 23:19:49 +0000 |
| commit | 60ac9f467cbbf8481a6f09e3e90e470dec85cf65 (patch) | |
| tree | d2e8f91eb7cb3e7594cbefaf71224e12c87cf133 /src | |
| parent | 3d5b8c6266fd58cefa0d7af8c6115fe22532d069 (diff) | |
| parent | 3be7f8bfed5966ef0f4c9cf348424cf3ebaf0f1e (diff) | |
| download | rust-60ac9f467cbbf8481a6f09e3e90e470dec85cf65.tar.gz rust-60ac9f467cbbf8481a6f09e3e90e470dec85cf65.zip | |
Auto merge of #42573 - frewsxcv:rollup, r=frewsxcv
Rollup of 5 pull requests - Successful merges: #42307, #42385, #42531, #42551, #42558 - Failed merges:
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcollections/vec.rs | 2 | ||||
| -rw-r--r-- | src/libcore/cell.rs | 10 | ||||
| -rw-r--r-- | src/librustdoc/html/static/main.js | 20 | ||||
| -rw-r--r-- | src/test/compile-fail/variadic-ffi.rs | 1 | ||||
| -rw-r--r-- | src/tools/tidy/src/style.rs | 4 |
5 files changed, 21 insertions, 16 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 3ef8438bc0b..2de27725e95 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<T>` but pronounced 'vector.' +//! `Vec<T>`. //! //! Vectors have `O(1)` indexing, amortized `O(1)` push (to the end) and //! `O(1)` pop (from the end). diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index ea480f38947..e75401f6ce0 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -391,17 +391,17 @@ impl<T> Cell<T> { } } - /// 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 { diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 53e341226af..38f83687d1d 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 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 <LICENSE-APACHE or + * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license + * <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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/test/compile-fail/variadic-ffi.rs b/src/test/compile-fail/variadic-ffi.rs index 125177efc53..f245306f4d8 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 diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 8bf683de870..35073b63723 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 }; |
