Skip to content

Commit

Permalink
Auto merge of #46166 - kennytm:rollup, r=kennytm
Browse files Browse the repository at this point in the history
Rollup of 11 pull requests

- Successful merges: #45987, #46031, #46050, #46052, #46103, #46120, #46134, #46141, #46148, #46155, #46157
- Failed merges:
  • Loading branch information
bors committed Nov 21, 2017
2 parents f28df20 + 7c8b36f commit 63739ab
Show file tree
Hide file tree
Showing 46 changed files with 392 additions and 462 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ Here are those same steps in detail:

These instructions are specific to updating `rustfmt`, however they may apply
to the other submodules as well. Please help by improving these instructions
if you find any discrepencies or special cases that need to be addressed.
if you find any discrepancies or special cases that need to be addressed.

To update the `rustfmt` submodule, start by running the appropriate
[`git submodule` command](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
Expand Down
27 changes: 12 additions & 15 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ Language
--------
- [`non_snake_case` lint now allows extern no-mangle functions][44966]
- [Now accepts underscores in unicode escapes][43716]
- [`#![feature(const_fn)]` is now no longer required for
calling const functions.][43017] It's still required for creating
constant functions.
- [`T op= &T` now works for numeric types.][44287] eg. `let mut x = 2; x += &8;`
- [types that impl `Drop` are now allowed in `const` and `static` types][44456]

Expand Down Expand Up @@ -45,8 +42,8 @@ Cargo
Misc
----
- [`libbacktrace` is now available on Apple platforms.][44251]
- [Stabilised the `compile_fail` attribute for code fences.][43949] This now
lets you specify that a given code example will fail to compile.
- [Stabilised the `compile_fail` attribute for code fences in doc-comments.][43949]
This now lets you specify that a given code example will fail to compile.

Compatibility Notes
-------------------
Expand Down Expand Up @@ -624,7 +621,7 @@ Misc
----

- [rustdoc can now use pulldown-cmark with the `--enable-commonmark` flag][40338]
- [Added rust-winbg script for better debugging on Windows][39983]
- [Added rust-windbg script for better debugging on Windows][39983]
- [Rust now uses the official cross compiler for NetBSD][40612]
- [rustdoc now accepts `#` at the start of files][40828]
- [Fixed jemalloc support for musl][41168]
Expand Down Expand Up @@ -1658,7 +1655,7 @@ Diagnostics
-----------

* [Replace macro backtraces with labeled local uses][35702]
* [Improve error message for missplaced doc comments][33922]
* [Improve error message for misplaced doc comments][33922]
* [Buffer unix and lock windows to prevent message interleaving][35975]
* [Update lifetime errors to specifically note temporaries][36171]
* [Special case a few colors for Windows][36178]
Expand Down Expand Up @@ -1966,7 +1963,7 @@ Language
useful](https://github.com/rust-lang/rust/pull/34908)
* [`macro_rules!` `stmt` matchers correctly consume the entire contents when
inside non-braces invocations](https://github.com/rust-lang/rust/pull/34886)
* [Semicolons are properly required as statement delimeters inside
* [Semicolons are properly required as statement delimiters inside
`macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34660)
* [`cfg_attr` works on `path` attributes](https://github.com/rust-lang/rust/pull/34546)

Expand Down Expand Up @@ -2191,7 +2188,7 @@ Compatibility Notes
* [`const`s and `static`s may not have unsized types](https://github.com/rust-lang/rust/pull/34443)
* [The new follow-set rules that place restrictions on `macro_rules!`
in order to ensure syntax forward-compatibility have been enabled](https://github.com/rust-lang/rust/pull/33982)
This was an [ammendment to RFC 550](https://github.com/rust-lang/rfcs/pull/1384),
This was an [amendment to RFC 550](https://github.com/rust-lang/rfcs/pull/1384),
and has been a warning since 1.10.
* [`cfg` attribute process has been refactored to fix various bugs](https://github.com/rust-lang/rust/pull/33706).
This causes breakage in some corner cases.
Expand Down Expand Up @@ -3348,7 +3345,7 @@ Libraries
* `FromStr` is [implemented for `SockAddrV4` and `SockAddrV6`][1.5s].
* There are now `From` conversions [between floating point
types][1.5f] where the conversions are lossless.
* Thera are now `From` conversions [between integer types][1.5i] where
* There are now `From` conversions [between integer types][1.5i] where
the conversions are lossless.
* [`fs::Metadata` implements `Clone`][1.5fs].
* The `parse` method [accepts a leading "+" when parsing
Expand Down Expand Up @@ -3548,7 +3545,7 @@ Libraries
* [`IntoIterator` is implemented for references to `Option` and
`Result`][into2].
* [`HashMap` and `HashSet` implement `Extend<&T>` where `T:
Copy`][ext] as part of [RFC 839]. This will cause type inferance
Copy`][ext] as part of [RFC 839]. This will cause type inference
breakage in rare situations.
* [`BinaryHeap` implements `Debug`][bh2].
* [`Borrow` and `BorrowMut` are implemented for fixed-size
Expand All @@ -3559,7 +3556,7 @@ Libraries
* `&mut T` where `T: std::fmt::Write` [also implements
`std::fmt::Write`][mutw].
* [A stable regression in `VecDeque::push_back` and other
capicity-altering methods that caused panics for zero-sized types
capacity-altering methods that caused panics for zero-sized types
was fixed][vd].
* [Function pointers implement traits for up to 12 parameters][fp2].

Expand Down Expand Up @@ -3746,7 +3743,7 @@ Libraries
[better for long data][sh].
* [`AtomicPtr`] implements [`Send`].
* The [`read_to_end`] implementations for [`Stdin`] and [`File`]
are now [specialized to use uninitalized buffers for increased
are now [specialized to use uninitialized buffers for increased
performance][rte].
* Lifetime parameters of foreign functions [are now resolved
properly][f].
Expand Down Expand Up @@ -3875,7 +3872,7 @@ Highlights
* This is the first release with [experimental support for linking
with the MSVC linker and lib C on Windows (instead of using the GNU
variants via MinGW)][win]. It is yet recommended only for the most
intrepid Rusticians.
intrepid Rustaceans.
* Benchmark compilations are showing a 30% improvement in
bootstrapping over 1.1.

Expand Down Expand Up @@ -4741,7 +4738,7 @@ Version 0.11.0 (2014-07-02)
* Libraries
* The standard library is now a "facade" over a number of underlying
libraries. This means that development on the standard library should
be speeder due to smaller crates, as well as a clearer line between
be speedier due to smaller crates, as well as a clearer line between
all dependencies.
* A new library, libcore, lives under the standard library's facade
which is Rust's "0-assumption" library, suitable for embedded and
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,12 @@ impl Step for Rustfmt {
compiler: builder.compiler(stage, build.build),
target
}).expect("Rustfmt to build: toolstate is testing");
let cargofmt = builder.ensure(tool::Cargofmt {
compiler: builder.compiler(stage, build.build),
target
}).expect("Cargofmt to build: toolstate is testing");
install(&rustfmt, &image.join("bin"), 0o755);
install(&cargofmt, &image.join("bin"), 0o755);
let doc = image.join("share/doc/rustfmt");
install(&src.join("README.md"), &doc, 0o644);
install(&src.join("LICENSE-MIT"), &doc, 0o644);
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ pub unsafe fn setup(build: &mut Build) {
0, FALSE, DUPLICATE_SAME_ACCESS);

// If this failed, well at least we tried! An example of DuplicateHandle
// failing in the past has been when the wrong python2 package spawed this
// failing in the past has been when the wrong python2 package spawned this
// build system (e.g. the `python2` package in MSYS instead of
// `mingw-w64-x86_64-python2`. Not sure why it failed, but the "failure
// mode" here is that we only clean everything up when the build system
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub fn check(build: &mut Build) {
}

let mut cmd_finder = Finder::new();
// If we've got a git directory we're gona need git to update
// If we've got a git directory we're gonna need git to update
// submodules and learn about various other aspects.
if build.rust_info.is_git() {
cmd_finder.must_have("git");
Expand Down
187 changes: 52 additions & 135 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,71 +403,66 @@ impl Step for Cargo {
}
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Clippy {
pub compiler: Compiler,
pub target: Interned<String>,
}
macro_rules! tool_extended {
(($sel:ident, $builder:ident),
$($name:ident,
$toolstate:ident,
$path:expr,
$tool_name:expr,
$extra_deps:block;)+) => {
$(
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct $name {
pub compiler: Compiler,
pub target: Interned<String>,
}

impl Step for Clippy {
type Output = Option<PathBuf>;
const DEFAULT: bool = true;
const ONLY_HOSTS: bool = true;
impl Step for $name {
type Output = Option<PathBuf>;
const DEFAULT: bool = true;
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun) -> ShouldRun {
let builder = run.builder;
run.path("src/tools/clippy").default_condition(builder.build.config.extended)
}
fn should_run(run: ShouldRun) -> ShouldRun {
let builder = run.builder;
run.path($path).default_condition(builder.build.config.extended)
}

fn make_run(run: RunConfig) {
run.builder.ensure(Clippy {
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
target: run.target,
});
fn make_run(run: RunConfig) {
run.builder.ensure($name {
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
target: run.target,
});
}

fn run($sel, $builder: &Builder) -> Option<PathBuf> {
$extra_deps
let toolstate = $builder.build.config.toolstate.$toolstate;
$builder.ensure(ToolBuild {
compiler: $sel.compiler,
target: $sel.target,
tool: $tool_name,
mode: Mode::Librustc,
path: $path,
expectation: toolstate.passes(ToolState::Compiling),
})
}
}
)+
}
}

fn run(self, builder: &Builder) -> Option<PathBuf> {
tool_extended!((self, builder),
Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", {};
Clippy, clippy, "src/tools/clippy", "clippy-driver", {
// Clippy depends on procedural macros (serde), which requires a full host
// compiler to be available, so we need to depend on that.
builder.ensure(compile::Rustc {
compiler: self.compiler,
target: builder.build.build,
});
builder.ensure(ToolBuild {
compiler: self.compiler,
target: self.target,
tool: "clippy-driver",
mode: Mode::Librustc,
path: "src/tools/clippy",
expectation: builder.build.config.toolstate.clippy.passes(ToolState::Compiling),
})
}
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Rls {
pub compiler: Compiler,
pub target: Interned<String>,
}

impl Step for Rls {
type Output = Option<PathBuf>;
const DEFAULT: bool = true;
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun) -> ShouldRun {
let builder = run.builder;
run.path("src/tools/rls").default_condition(builder.build.config.extended)
}

fn make_run(run: RunConfig) {
run.builder.ensure(Rls {
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
target: run.target,
});
}

fn run(self, builder: &Builder) -> Option<PathBuf> {
};
Miri, miri, "src/tools/miri", "miri", {};
Rls, rls, "src/tools/rls", "rls", {
builder.ensure(native::Openssl {
target: self.target,
});
Expand All @@ -477,87 +472,9 @@ impl Step for Rls {
compiler: self.compiler,
target: builder.build.build,
});
builder.ensure(ToolBuild {
compiler: self.compiler,
target: self.target,
tool: "rls",
mode: Mode::Librustc,
path: "src/tools/rls",
expectation: builder.build.config.toolstate.rls.passes(ToolState::Compiling),
})
}
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Rustfmt {
pub compiler: Compiler,
pub target: Interned<String>,
}

impl Step for Rustfmt {
type Output = Option<PathBuf>;
const DEFAULT: bool = true;
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun) -> ShouldRun {
let builder = run.builder;
run.path("src/tools/rustfmt").default_condition(builder.build.config.extended)
}

fn make_run(run: RunConfig) {
run.builder.ensure(Rustfmt {
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
target: run.target,
});
}

fn run(self, builder: &Builder) -> Option<PathBuf> {
builder.ensure(ToolBuild {
compiler: self.compiler,
target: self.target,
tool: "rustfmt",
mode: Mode::Librustc,
path: "src/tools/rustfmt",
expectation: builder.build.config.toolstate.rustfmt.passes(ToolState::Compiling),
})
}
}


#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Miri {
pub compiler: Compiler,
pub target: Interned<String>,
}

impl Step for Miri {
type Output = Option<PathBuf>;
const DEFAULT: bool = true;
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun) -> ShouldRun {
let build_miri = run.builder.build.config.test_miri;
run.path("src/tools/miri").default_condition(build_miri)
}

fn make_run(run: RunConfig) {
run.builder.ensure(Miri {
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
target: run.target,
});
}

fn run(self, builder: &Builder) -> Option<PathBuf> {
builder.ensure(ToolBuild {
compiler: self.compiler,
target: self.target,
tool: "miri",
mode: Mode::Librustc,
path: "src/tools/miri",
expectation: builder.build.config.toolstate.miri.passes(ToolState::Compiling),
})
}
}
};
Rustfmt, rustfmt, "src/tools/rustfmt", "rustfmt", {};
);

impl<'a> Builder<'a> {
/// Get a `Command` which is ready to run `tool` in `stage` built for
Expand Down
4 changes: 2 additions & 2 deletions src/ci/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ a Docker image.

1. Select the "default" virtual machine inside VirtualBox, then click
"Settings"
2. Go to "Shared Folders", click "Add shared foldrer" (the folder icon with
2. Go to "Shared Folders", click "Add shared folder" (the folder icon with
a plus sign), fill in the following information, then click "OK":

* Folder path: `E:\rust`
* Folder name: `e/rust`
* Read-only: ☐ *unchecked*
* Auto-mount: ☑ *checked*
* Make Permanant: ☑ *checked*
* Make Permanent: ☑ *checked*

3. VirtualBox might not support creating symbolic links inside a shared folder
by default. You can enable it manually by running these from `cmd.exe`:
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ curl $URL/2017-03-17-netbsd-comp.tgz | \
cd usr/src

# The options, in order, do the following
# * this is an unpriviledged build
# * this is an unprivileged build
# * output to a predictable location
# * disable various uneeded stuff
MKUNPRIVED=yes TOOLDIR=/x-tools/x86_64-unknown-netbsd \
Expand Down
2 changes: 1 addition & 1 deletion src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if [ "$DIST_SRC" = "" ]; then
fi

# If we're deploying artifacts then we set the release channel, otherwise if
# we're not deploying then we want to be sure to enable all assertions becauase
# we're not deploying then we want to be sure to enable all assertions because
# we'll be running tests
#
# FIXME: need a scheme for changing this `nightly` value to `beta` and `stable`
Expand Down
Loading

0 comments on commit 63739ab

Please sign in to comment.