Skip to content

Commit 63739ab

Browse files
committed
Auto merge of #46166 - kennytm:rollup, r=kennytm
Rollup of 11 pull requests - Successful merges: #45987, #46031, #46050, #46052, #46103, #46120, #46134, #46141, #46148, #46155, #46157 - Failed merges:
2 parents f28df20 + 7c8b36f commit 63739ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+392
-462
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ Here are those same steps in detail:
421421

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

426426
To update the `rustfmt` submodule, start by running the appropriate
427427
[`git submodule` command](https://git-scm.com/book/en/v2/Git-Tools-Submodules).

RELEASES.md

+12-15
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ Language
55
--------
66
- [`non_snake_case` lint now allows extern no-mangle functions][44966]
77
- [Now accepts underscores in unicode escapes][43716]
8-
- [`#![feature(const_fn)]` is now no longer required for
9-
calling const functions.][43017] It's still required for creating
10-
constant functions.
118
- [`T op= &T` now works for numeric types.][44287] eg. `let mut x = 2; x += &8;`
129
- [types that impl `Drop` are now allowed in `const` and `static` types][44456]
1310

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

5148
Compatibility Notes
5249
-------------------
@@ -624,7 +621,7 @@ Misc
624621
----
625622

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

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

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

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

@@ -4741,7 +4738,7 @@ Version 0.11.0 (2014-07-02)
47414738
* Libraries
47424739
* The standard library is now a "facade" over a number of underlying
47434740
libraries. This means that development on the standard library should
4744-
be speeder due to smaller crates, as well as a clearer line between
4741+
be speedier due to smaller crates, as well as a clearer line between
47454742
all dependencies.
47464743
* A new library, libcore, lives under the standard library's facade
47474744
which is Rust's "0-assumption" library, suitable for embedded and

src/bootstrap/dist.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,12 @@ impl Step for Rustfmt {
11681168
compiler: builder.compiler(stage, build.build),
11691169
target
11701170
}).expect("Rustfmt to build: toolstate is testing");
1171+
let cargofmt = builder.ensure(tool::Cargofmt {
1172+
compiler: builder.compiler(stage, build.build),
1173+
target
1174+
}).expect("Cargofmt to build: toolstate is testing");
11711175
install(&rustfmt, &image.join("bin"), 0o755);
1176+
install(&cargofmt, &image.join("bin"), 0o755);
11721177
let doc = image.join("share/doc/rustfmt");
11731178
install(&src.join("README.md"), &doc, 0o644);
11741179
install(&src.join("LICENSE-MIT"), &doc, 0o644);

src/bootstrap/job.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub unsafe fn setup(build: &mut Build) {
185185
0, FALSE, DUPLICATE_SAME_ACCESS);
186186

187187
// If this failed, well at least we tried! An example of DuplicateHandle
188-
// failing in the past has been when the wrong python2 package spawed this
188+
// failing in the past has been when the wrong python2 package spawned this
189189
// build system (e.g. the `python2` package in MSYS instead of
190190
// `mingw-w64-x86_64-python2`. Not sure why it failed, but the "failure
191191
// mode" here is that we only clean everything up when the build system

src/bootstrap/sanity.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub fn check(build: &mut Build) {
7878
}
7979

8080
let mut cmd_finder = Finder::new();
81-
// If we've got a git directory we're gona need git to update
81+
// If we've got a git directory we're gonna need git to update
8282
// submodules and learn about various other aspects.
8383
if build.rust_info.is_git() {
8484
cmd_finder.must_have("git");

src/bootstrap/tool.rs

+52-135
Original file line numberDiff line numberDiff line change
@@ -403,71 +403,66 @@ impl Step for Cargo {
403403
}
404404
}
405405

406-
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
407-
pub struct Clippy {
408-
pub compiler: Compiler,
409-
pub target: Interned<String>,
410-
}
406+
macro_rules! tool_extended {
407+
(($sel:ident, $builder:ident),
408+
$($name:ident,
409+
$toolstate:ident,
410+
$path:expr,
411+
$tool_name:expr,
412+
$extra_deps:block;)+) => {
413+
$(
414+
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
415+
pub struct $name {
416+
pub compiler: Compiler,
417+
pub target: Interned<String>,
418+
}
411419

412-
impl Step for Clippy {
413-
type Output = Option<PathBuf>;
414-
const DEFAULT: bool = true;
415-
const ONLY_HOSTS: bool = true;
420+
impl Step for $name {
421+
type Output = Option<PathBuf>;
422+
const DEFAULT: bool = true;
423+
const ONLY_HOSTS: bool = true;
416424

417-
fn should_run(run: ShouldRun) -> ShouldRun {
418-
let builder = run.builder;
419-
run.path("src/tools/clippy").default_condition(builder.build.config.extended)
420-
}
425+
fn should_run(run: ShouldRun) -> ShouldRun {
426+
let builder = run.builder;
427+
run.path($path).default_condition(builder.build.config.extended)
428+
}
421429

422-
fn make_run(run: RunConfig) {
423-
run.builder.ensure(Clippy {
424-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
425-
target: run.target,
426-
});
430+
fn make_run(run: RunConfig) {
431+
run.builder.ensure($name {
432+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
433+
target: run.target,
434+
});
435+
}
436+
437+
fn run($sel, $builder: &Builder) -> Option<PathBuf> {
438+
$extra_deps
439+
let toolstate = $builder.build.config.toolstate.$toolstate;
440+
$builder.ensure(ToolBuild {
441+
compiler: $sel.compiler,
442+
target: $sel.target,
443+
tool: $tool_name,
444+
mode: Mode::Librustc,
445+
path: $path,
446+
expectation: toolstate.passes(ToolState::Compiling),
447+
})
448+
}
449+
}
450+
)+
427451
}
452+
}
428453

429-
fn run(self, builder: &Builder) -> Option<PathBuf> {
454+
tool_extended!((self, builder),
455+
Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", {};
456+
Clippy, clippy, "src/tools/clippy", "clippy-driver", {
430457
// Clippy depends on procedural macros (serde), which requires a full host
431458
// compiler to be available, so we need to depend on that.
432459
builder.ensure(compile::Rustc {
433460
compiler: self.compiler,
434461
target: builder.build.build,
435462
});
436-
builder.ensure(ToolBuild {
437-
compiler: self.compiler,
438-
target: self.target,
439-
tool: "clippy-driver",
440-
mode: Mode::Librustc,
441-
path: "src/tools/clippy",
442-
expectation: builder.build.config.toolstate.clippy.passes(ToolState::Compiling),
443-
})
444-
}
445-
}
446-
447-
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
448-
pub struct Rls {
449-
pub compiler: Compiler,
450-
pub target: Interned<String>,
451-
}
452-
453-
impl Step for Rls {
454-
type Output = Option<PathBuf>;
455-
const DEFAULT: bool = true;
456-
const ONLY_HOSTS: bool = true;
457-
458-
fn should_run(run: ShouldRun) -> ShouldRun {
459-
let builder = run.builder;
460-
run.path("src/tools/rls").default_condition(builder.build.config.extended)
461-
}
462-
463-
fn make_run(run: RunConfig) {
464-
run.builder.ensure(Rls {
465-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
466-
target: run.target,
467-
});
468-
}
469-
470-
fn run(self, builder: &Builder) -> Option<PathBuf> {
463+
};
464+
Miri, miri, "src/tools/miri", "miri", {};
465+
Rls, rls, "src/tools/rls", "rls", {
471466
builder.ensure(native::Openssl {
472467
target: self.target,
473468
});
@@ -477,87 +472,9 @@ impl Step for Rls {
477472
compiler: self.compiler,
478473
target: builder.build.build,
479474
});
480-
builder.ensure(ToolBuild {
481-
compiler: self.compiler,
482-
target: self.target,
483-
tool: "rls",
484-
mode: Mode::Librustc,
485-
path: "src/tools/rls",
486-
expectation: builder.build.config.toolstate.rls.passes(ToolState::Compiling),
487-
})
488-
}
489-
}
490-
491-
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
492-
pub struct Rustfmt {
493-
pub compiler: Compiler,
494-
pub target: Interned<String>,
495-
}
496-
497-
impl Step for Rustfmt {
498-
type Output = Option<PathBuf>;
499-
const DEFAULT: bool = true;
500-
const ONLY_HOSTS: bool = true;
501-
502-
fn should_run(run: ShouldRun) -> ShouldRun {
503-
let builder = run.builder;
504-
run.path("src/tools/rustfmt").default_condition(builder.build.config.extended)
505-
}
506-
507-
fn make_run(run: RunConfig) {
508-
run.builder.ensure(Rustfmt {
509-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
510-
target: run.target,
511-
});
512-
}
513-
514-
fn run(self, builder: &Builder) -> Option<PathBuf> {
515-
builder.ensure(ToolBuild {
516-
compiler: self.compiler,
517-
target: self.target,
518-
tool: "rustfmt",
519-
mode: Mode::Librustc,
520-
path: "src/tools/rustfmt",
521-
expectation: builder.build.config.toolstate.rustfmt.passes(ToolState::Compiling),
522-
})
523-
}
524-
}
525-
526-
527-
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
528-
pub struct Miri {
529-
pub compiler: Compiler,
530-
pub target: Interned<String>,
531-
}
532-
533-
impl Step for Miri {
534-
type Output = Option<PathBuf>;
535-
const DEFAULT: bool = true;
536-
const ONLY_HOSTS: bool = true;
537-
538-
fn should_run(run: ShouldRun) -> ShouldRun {
539-
let build_miri = run.builder.build.config.test_miri;
540-
run.path("src/tools/miri").default_condition(build_miri)
541-
}
542-
543-
fn make_run(run: RunConfig) {
544-
run.builder.ensure(Miri {
545-
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
546-
target: run.target,
547-
});
548-
}
549-
550-
fn run(self, builder: &Builder) -> Option<PathBuf> {
551-
builder.ensure(ToolBuild {
552-
compiler: self.compiler,
553-
target: self.target,
554-
tool: "miri",
555-
mode: Mode::Librustc,
556-
path: "src/tools/miri",
557-
expectation: builder.build.config.toolstate.miri.passes(ToolState::Compiling),
558-
})
559-
}
560-
}
475+
};
476+
Rustfmt, rustfmt, "src/tools/rustfmt", "rustfmt", {};
477+
);
561478

562479
impl<'a> Builder<'a> {
563480
/// Get a `Command` which is ready to run `tool` in `stage` built for

src/ci/docker/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ a Docker image.
3636

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

4242
* Folder path: `E:\rust`
4343
* Folder name: `e/rust`
4444
* Read-only: ☐ *unchecked*
4545
* Auto-mount: ☑ *checked*
46-
* Make Permanant: ☑ *checked*
46+
* Make Permanent: ☑ *checked*
4747

4848
3. VirtualBox might not support creating symbolic links inside a shared folder
4949
by default. You can enable it manually by running these from `cmd.exe`:

src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ curl $URL/2017-03-17-netbsd-comp.tgz | \
5252
cd usr/src
5353

5454
# The options, in order, do the following
55-
# * this is an unpriviledged build
55+
# * this is an unprivileged build
5656
# * output to a predictable location
5757
# * disable various uneeded stuff
5858
MKUNPRIVED=yes TOOLDIR=/x-tools/x86_64-unknown-netbsd \

src/ci/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if [ "$DIST_SRC" = "" ]; then
3737
fi
3838

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

0 commit comments

Comments
 (0)