Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #71920

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
8f5c66c
Introduce BTreeMap benches of iter itself
ssomers Apr 23, 2020
8730227
Speed up BTreeMap iteration by intertwined descend to the initial lea…
ssomers Apr 22, 2020
9e43b00
Turn of rustc-dev-guide toolstate for now
mark-i-m May 1, 2020
19e5da9
SipHasher::new() is literally with SipHasher with both keys being 0
hbina May 1, 2020
9bcf409
x.py: Give a more helpful error message if curl isn't installed
jyn514 May 3, 2020
61fdd3e
expand comment on default mutex behavior
RalfJung May 4, 2020
40a6b8c
explain our rwlock implementation (and fix a potential data race)
RalfJung May 4, 2020
3f50292
edit Mutex comment
RalfJung May 4, 2020
b83853d
Add command aliases from Cargo to x.py commands
mibac138 May 4, 2020
f9866f9
rely on rdlock/wrlock not returning anything but the specified error …
RalfJung May 5, 2020
3857506
backport 1.43.1 release notes
cuviper May 1, 2020
eaee6e3
Rollup merge of #71510 - ssomers:btreemap_iter_intertwined, r=Mark-Si…
Dylan-DPC May 5, 2020
fb5e9f2
Rollup merge of #71727 - hbina:simplified_usage, r=Mark-Simulacrum
Dylan-DPC May 5, 2020
158b2d8
Rollup merge of #71731 - mark-i-m:guide-toolstate-off-for-now, r=kennytm
Dylan-DPC May 5, 2020
436042a
Rollup merge of #71819 - jyn514:check-for-tools, r=Mark-Simulacrum
Dylan-DPC May 5, 2020
2253718
Rollup merge of #71889 - RalfJung:rwlock, r=Amanieu
Dylan-DPC May 5, 2020
d20d71b
Rollup merge of #71905 - mibac138:x-cmd-alias, r=Mark-Simulacrum
Dylan-DPC May 5, 2020
ae4757b
Rollup merge of #71914 - pietroalbini:relnotes-1.43.1, r=Mark-Simulacrum
Dylan-DPC May 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Version 1.43.1 (2020-05-07)
===========================

* [Updated openssl-src to 1.1.1g for CVE-2020-1967.][71430]
* [Fixed the stabilization of AVX-512 features.][71473]
* [Fixed `cargo package --list` not working with unpublished dependencies.][cargo/8151]

[71430]: https://github.com/rust-lang/rust/pull/71430
[71473]: https://github.com/rust-lang/rust/issues/71473
[cargo/8151]: https://github.com/rust-lang/cargo/issues/8151


Version 1.43.0 (2020-04-23)
==========================

Expand All @@ -14,7 +26,7 @@ Language
- [Merge `fn` syntax + cleanup item parsing.][68728]
- [`item` macro fragments can be interpolated into `trait`s, `impl`s, and `extern` blocks.][69366]
For example, you may now write:
```rust
```rust
macro_rules! mac_trait {
($i:item) => {
trait T { $i }
Expand Down Expand Up @@ -82,7 +94,7 @@ Misc
- [Certain checks in the `const_err` lint were deemed unrelated to const
evaluation][69185], and have been moved to the `unconditional_panic` and
`arithmetic_overflow` lints.

Compatibility Notes
-------------------

Expand Down Expand Up @@ -173,7 +185,7 @@ Language
(e.g. `type Foo: Ord;`).
- `...` (the C-variadic type) may occur syntactically directly as the type of
any function parameter.

These are still rejected *semantically*, so you will likely receive an error
but these changes can be seen and parsed by procedural macros and
conditional compilation.
Expand Down Expand Up @@ -465,7 +477,7 @@ Compatibility Notes
- [Using `#[inline]` on function prototypes and consts now emits a warning under
`unused_attribute` lint.][65294] Using `#[inline]` anywhere else inside traits
or `extern` blocks now correctly emits a hard error.

[65294]: https://github.com/rust-lang/rust/pull/65294/
[66103]: https://github.com/rust-lang/rust/pull/66103/
[65843]: https://github.com/rust-lang/rust/pull/65843/
Expand Down
48 changes: 25 additions & 23 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def _download(path, url, probably_big, verbose, exception):
option = "-#"
else:
option = "-s"
require(["curl", "--version"])
run(["curl", option,
"-y", "30", "-Y", "10", # timeout if speed is < 10 bytes/sec for > 30 seconds
"--connect-timeout", "30", # timeout if cannot connect within 30 seconds
Expand Down Expand Up @@ -143,6 +144,21 @@ def run(args, verbose=False, exception=False, **kwargs):
sys.exit(err)


def require(cmd, exit=True):
'''Run a command, returning its output.
On error,
If `exit` is `True`, exit the process.
Otherwise, return None.'''
try:
return subprocess.check_output(cmd).strip()
except (subprocess.CalledProcessError, OSError) as exc:
if not exit:
return None
print("error: unable to run `{}`: {}".format(' '.join(cmd), exc))
print("Please make sure it's installed and in the path.")
sys.exit(1)


def stage0_data(rust_root):
"""Build a dictionary from stage0.txt"""
nightlies = os.path.join(rust_root, "src/stage0.txt")
Expand All @@ -164,16 +180,12 @@ def format_build_time(duration):
def default_build_triple():
"""Build triple as in LLVM"""
default_encoding = sys.getdefaultencoding()
try:
ostype = subprocess.check_output(
['uname', '-s']).strip().decode(default_encoding)
cputype = subprocess.check_output(
['uname', '-m']).strip().decode(default_encoding)
except (subprocess.CalledProcessError, OSError):
if sys.platform == 'win32':
return 'x86_64-pc-windows-msvc'
err = "uname not found"
sys.exit(err)
required = not sys.platform == 'win32'
ostype = require(["uname", "-s"], exit=required).decode(default_encoding)
cputype = require(['uname', '-m'], exit=required).decode(default_encoding)

if ostype is None or cputype is None:
return 'x86_64-pc-windows-msvc'

# The goal here is to come up with the same triple as LLVM would,
# at least for the subset of platforms we're willing to target.
Expand Down Expand Up @@ -203,12 +215,7 @@ def default_build_triple():
# output from that option is too generic for our purposes (it will
# always emit 'i386' on x86/amd64 systems). As such, isainfo -k
# must be used instead.
try:
cputype = subprocess.check_output(
['isainfo', '-k']).strip().decode(default_encoding)
except (subprocess.CalledProcessError, OSError):
err = "isainfo not found"
sys.exit(err)
cputype = require(['isainfo', '-k']).decode(default_encoding)
elif ostype.startswith('MINGW'):
# msys' `uname` does not print gcc configuration, but prints msys
# configuration. so we cannot believe `uname -m`:
Expand Down Expand Up @@ -766,13 +773,8 @@ def update_submodules(self):
default_encoding = sys.getdefaultencoding()

# check the existence and version of 'git' command
try:
git_version_output = subprocess.check_output(['git', '--version'])
git_version_str = git_version_output.strip().split()[2].decode(default_encoding)
self.git_version = distutils.version.LooseVersion(git_version_str)
except (subprocess.CalledProcessError, OSError):
print("error: `git` is not found, please make sure it's installed and in the path.")
sys.exit(1)
git_version_str = require(['git', '--version']).split()[2].decode(default_encoding)
self.git_version = distutils.version.LooseVersion(git_version_str)

slow_submodules = self.get_toml('fast-submodules') == "false"
start_time = time()
Expand Down
30 changes: 17 additions & 13 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,18 @@ impl Flags {
Usage: x.py <subcommand> [options] [<paths>...]

Subcommands:
build Compile either the compiler or libraries
check Compile either the compiler or libraries, using cargo check
build, b Compile either the compiler or libraries
check, c Compile either the compiler or libraries, using cargo check
clippy Run clippy (uses rustup/cargo-installed clippy binary)
fix Run cargo fix
fmt Run rustfmt
test Build and run some test suites
test, t Build and run some test suites
bench Build and run some benchmarks
doc Build documentation
clean Clean out build directories
dist Build distribution artifacts
install Install distribution artifacts
run Run tools contained in this repository
run, r Run tools contained in this repository

To learn more about a subcommand, run `./x.py <subcommand> -h`",
);
Expand Down Expand Up @@ -184,17 +184,21 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
// there on out.
let subcommand = args.iter().find(|&s| {
(s == "build")
|| (s == "b")
|| (s == "check")
|| (s == "c")
|| (s == "clippy")
|| (s == "fix")
|| (s == "fmt")
|| (s == "test")
|| (s == "t")
|| (s == "bench")
|| (s == "doc")
|| (s == "clean")
|| (s == "dist")
|| (s == "install")
|| (s == "run")
|| (s == "r")
});
let subcommand = match subcommand {
Some(s) => s,
Expand All @@ -210,7 +214,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",

// Some subcommands get extra options
match subcommand.as_str() {
"test" => {
"test" | "t" => {
opts.optflag("", "no-fail-fast", "Run all tests regardless of failure");
opts.optmulti("", "test-args", "extra arguments", "ARGS");
opts.optmulti(
Expand Down Expand Up @@ -285,7 +289,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
}
// Extra help text for some commands
match subcommand.as_str() {
"build" => {
"build" | "b" => {
subcommand_help.push_str(
"\n
Arguments:
Expand All @@ -312,7 +316,7 @@ Arguments:
Once this is done, build/$ARCH/stage1 contains a usable compiler.",
);
}
"check" => {
"check" | "c" => {
subcommand_help.push_str(
"\n
Arguments:
Expand Down Expand Up @@ -362,7 +366,7 @@ Arguments:
./x.py fmt --check",
);
}
"test" => {
"test" | "t" => {
subcommand_help.push_str(
"\n
Arguments:
Expand Down Expand Up @@ -407,7 +411,7 @@ Arguments:
./x.py doc --stage 1",
);
}
"run" => {
"run" | "r" => {
subcommand_help.push_str(
"\n
Arguments:
Expand Down Expand Up @@ -453,11 +457,11 @@ Arguments:
}

let cmd = match subcommand.as_str() {
"build" => Subcommand::Build { paths },
"check" => Subcommand::Check { paths },
"build" | "b" => Subcommand::Build { paths },
"check" | "c" => Subcommand::Check { paths },
"clippy" => Subcommand::Clippy { paths },
"fix" => Subcommand::Fix { paths },
"test" => Subcommand::Test {
"test" | "t" => Subcommand::Test {
paths,
bless: matches.opt_present("bless"),
compare_mode: matches.opt_str("compare-mode"),
Expand Down Expand Up @@ -487,7 +491,7 @@ Arguments:
"fmt" => Subcommand::Format { check: matches.opt_present("check") },
"dist" => Subcommand::Dist { paths },
"install" => Subcommand::Install { paths },
"run" => {
"run" | "r" => {
if paths.is_empty() {
println!("\nrun requires at least a path!\n");
usage(1, &opts, &subcommand_help, &extra_help);
Expand Down
1 change: 0 additions & 1 deletion src/ci/docker/x86_64-gnu-tools/checktools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ python3 "$X_PY" test --no-fail-fast \
src/doc/rust-by-example \
src/doc/embedded-book \
src/doc/edition-guide \
src/doc/rustc-dev-guide \
src/tools/clippy \
src/tools/rls \
src/tools/rustfmt \
Expand Down
Loading