Skip to content

Commit

Permalink
Auto merge of #42573 - frewsxcv:rollup, r=frewsxcv
Browse files Browse the repository at this point in the history
Rollup of 5 pull requests

- Successful merges: #42307, #42385, #42531, #42551, #42558
- Failed merges:
  • Loading branch information
bors committed Jun 9, 2017
2 parents 3d5b8c6 + 3be7f8b commit 60ac9f4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
10 changes: 5 additions & 5 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
20 changes: 11 additions & 9 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/variadic-ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/tools/tidy/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down

0 comments on commit 60ac9f4

Please sign in to comment.