]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRollup merge of #77788 - ssomers:btree_cleanup_gdb, r=Mark-Simulacrum
Dylan DPC [Wed, 14 Oct 2020 00:30:36 +0000 (02:30 +0200)]
Rollup merge of #77788 - ssomers:btree_cleanup_gdb, r=Mark-Simulacrum

BTreeMap: fix gdb provider on BTreeMap with ZST keys or values

Avoid error when gdb is asked to inspect a BTreeMap or BTreeSet with a zero-sized type as key or value. And clean up.

r? @Mark-Simulacrum

3 years agoRollup merge of #77765 - amshafer:master, r=petrochenkov
Dylan DPC [Wed, 14 Oct 2020 00:30:34 +0000 (02:30 +0200)]
Rollup merge of #77765 - amshafer:master, r=petrochenkov

Add LLVM flags to limit DWARF version to 2 on BSD

This has been a thorn in my side for a while, I can finally generate flamegraphs of rust programs on bsd again. This fixes dtrace profiling on freebsd, I think it might help with lldb as well but I can't test that because my current rust-lldb setup is messed up.

I'm limiting the dwarf version to 2 on all bsd's (netbsd/openbsd/freebsd) since it looks like this applies to all of them, but I have only tested on freebsd.

Let me know if there's anything I can improve!

---
Currently on FreeBSD dtrace profiling does not work and shows jumbled/incorrect
symbols in the backtraces. FreeBSD does not support the latest versions of DWARF
in dtrace (and lldb?) yet, and needs to be limited to DWARF2 in the same way as macos.

This adds an is_like_bsd flag since it was missing. NetBSD/OpenBSD/FreeBSD all
match this.

This effectively copies #11864 but targets FreeBSD instead of macos.

3 years agoAuto merge of #77917 - JohnTitor:rollup-e47h2qt, r=JohnTitor
bors [Tue, 13 Oct 2020 22:13:09 +0000 (22:13 +0000)]
Auto merge of #77917 - JohnTitor:rollup-e47h2qt, r=JohnTitor

Rollup of 14 pull requests

Successful merges:

 - #77239 (Enable building Cargo for aarch64-apple-darwin)
 - #77569 (BTreeMap: type-specific variants of node_as_mut and cast_unchecked)
 - #77719 (Remove unnecessary rustc_const_stable attributes.)
 - #77722 (Remove unsafety from sys/unsupported and add deny(unsafe_op_in_unsafe_fn).)
 - #77725 (Add regression issue template)
 - #77776 ( Give an error when running `x.py test --stage 0 src/test/ui`)
 - #77786 (Mention rustdoc in `x.py setup`)
 - #77825 (`min_const_generics` diagnostics improvements)
 - #77868 (Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component)
 - #77884 (Use Option::unwrap_or instead of open-coding it)
 - #77886 (Replace trivial bool matches with the `matches!` macro)
 - #77892 (Replace absolute paths with relative ones)
 - #77895 (Include aarch64-apple-darwin in the dist manifests)
 - #77909 (bootstrap: set correct path for the build-manifest binary)

Failed merges:

 - #77902 (Include aarch64-pc-windows-msvc in the dist manifests)

r? `@ghost`

3 years agoRollup merge of #77909 - pietroalbini:fix-build-manifest-path, r=Mark-Simulacrum
Yuki Okushi [Tue, 13 Oct 2020 21:02:41 +0000 (06:02 +0900)]
Rollup merge of #77909 - pietroalbini:fix-build-manifest-path, r=Mark-Simulacrum

bootstrap: set correct path for the build-manifest binary

This changes the path of the binary inside the tarball to be:

```
build-manifest-{release}-{target}/build-manifest/bin/build-manifest
```

...instead of:

```
build-manifest-{release}-{target}/build-manifest/bin/build-manifest/build-manifest
```

r? @Mark-Simulacrum

3 years agoRollup merge of #77895 - shepmaster:silicon-manifest, r=pietroalbini
Yuki Okushi [Tue, 13 Oct 2020 21:02:38 +0000 (06:02 +0900)]
Rollup merge of #77895 - shepmaster:silicon-manifest, r=pietroalbini

Include aarch64-apple-darwin in the dist manifests

r? @ehuss

/cc @pietroalbini @Mark-Simulacrum

3 years agoRollup merge of #77892 - est31:remove_redundant_absolute_paths, r=lcnr
Yuki Okushi [Tue, 13 Oct 2020 21:02:36 +0000 (06:02 +0900)]
Rollup merge of #77892 - est31:remove_redundant_absolute_paths, r=lcnr

Replace absolute paths with relative ones

Modern compilers allow reaching external crates
like std or core via relative paths in modules
outside of lib.rs and main.rs.

3 years agoRollup merge of #77886 - LingMan:ast_pretty_bool_matches, r=petrochenkov
Yuki Okushi [Tue, 13 Oct 2020 21:02:35 +0000 (06:02 +0900)]
Rollup merge of #77886 - LingMan:ast_pretty_bool_matches, r=petrochenkov

Replace trivial bool matches with the `matches!` macro

This derives `PartialEq` on one enum (and two structs it contains) to enable the `==` operator for it. If there's some downside to this, I could respin with the `matches!` macro instead.

3 years agoRollup merge of #77884 - LingMan:ast_pretty_unwrap_or, r=varkor
Yuki Okushi [Tue, 13 Oct 2020 21:02:33 +0000 (06:02 +0900)]
Rollup merge of #77884 - LingMan:ast_pretty_unwrap_or, r=varkor

Use Option::unwrap_or instead of open-coding it

3 years agoRollup merge of #77868 - Aaron1011:llvm-tools-opt-llc, r=Mark-Simulacrum
Yuki Okushi [Tue, 13 Oct 2020 21:02:31 +0000 (06:02 +0900)]
Rollup merge of #77868 - Aaron1011:llvm-tools-opt-llc, r=Mark-Simulacrum

Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component

Fixes #55890

It's useful to have `llc` and `opt` available when debugging an LLVM
miscompilation,.

3 years agoRollup merge of #77825 - ethanboxx:min_const_generics_diagnostic, r=lcnr
Yuki Okushi [Tue, 13 Oct 2020 21:02:29 +0000 (06:02 +0900)]
Rollup merge of #77825 - ethanboxx:min_const_generics_diagnostic, r=lcnr

`min_const_generics` diagnostics improvements

As disscussed in [zulip/project-const-generics/non-trivial anonymous constant](https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/non-trivial.20anonymous.20constants).

This is my first PR on the compiler.

@lcnr is mentoring me on this PR.

Related to #60551.

3 years agoRollup merge of #77786 - jyn514:rustdoc, r=Mark-Simulacrum
Yuki Okushi [Tue, 13 Oct 2020 21:02:27 +0000 (06:02 +0900)]
Rollup merge of #77786 - jyn514:rustdoc, r=Mark-Simulacrum

Mention rustdoc in `x.py setup`

This lets new contributors know which option they should pick; previously it wasn't clear 'compiler' also included rustdoc.

Unresolved questions: should this say 'compiler and tools' instead? I don't know of any tools that are modified in-tree other than rustdoc, though.

r? @Mark-Simulacrum

3 years agoRollup merge of #77776 - jyn514:wrong-way, r=Mark-Simulacrum
Yuki Okushi [Tue, 13 Oct 2020 21:02:25 +0000 (06:02 +0900)]
Rollup merge of #77776 - jyn514:wrong-way, r=Mark-Simulacrum

 Give an error when running `x.py test --stage 0 src/test/ui`

The error can be overridden with `COMPILETEST_FORCE_STAGE0=1`. In practice I don't know why anyone would do this.

r? @Mark-Simulacrum

Closes https://github.com/rust-lang/rust/issues/77711

3 years agoRollup merge of #77725 - camelid:regression-template, r=Mark-Simulacrum
Yuki Okushi [Tue, 13 Oct 2020 21:02:24 +0000 (06:02 +0900)]
Rollup merge of #77725 - camelid:regression-template, r=Mark-Simulacrum

Add regression issue template

Feel free to suggest improvements!

3 years agoRollup merge of #77722 - fusion-engineering-forks:safe-unsupported-locks, r=Mark...
Yuki Okushi [Tue, 13 Oct 2020 21:02:21 +0000 (06:02 +0900)]
Rollup merge of #77722 - fusion-engineering-forks:safe-unsupported-locks, r=Mark-Simulacrum

Remove unsafety from sys/unsupported and add deny(unsafe_op_in_unsafe_fn).

Replacing `UnsafeCell`s by a `Cell`s simplifies things and makes the mutex and rwlock implementations safe. Other than that, only unsafety in strlen() contained unsafe code.

@rustbot modify labels: +F-unsafe-block-in-unsafe-fn +C-cleanup

3 years agoRollup merge of #77719 - fusion-engineering-forks:const-new-mutex-attr-cleanup, r...
Yuki Okushi [Tue, 13 Oct 2020 21:02:19 +0000 (06:02 +0900)]
Rollup merge of #77719 - fusion-engineering-forks:const-new-mutex-attr-cleanup, r=Mark-Simulacrum

Remove unnecessary rustc_const_stable attributes.

These attributes were added in https://github.com/rust-lang/rust/pull/74033#discussion_r450593156 because of [std::io::lazy::Lazy::new](https://github.com/rust-lang/rust/blob/0c03aee8b81185d65b5821518661c30ecdb42de5/src/libstd/io/lazy.rs#L21-L23). But [std::io::lazy::Lazy is gone now](https://github.com/rust-lang/rust/pull/77154), so this can be cleaned up.

@rustbot modify labels: +T-libs +C-cleanup

3 years agoRollup merge of #77569 - ssomers:btree_cleanup_1, r=Mark-Simulacrum
Yuki Okushi [Tue, 13 Oct 2020 21:02:17 +0000 (06:02 +0900)]
Rollup merge of #77569 - ssomers:btree_cleanup_1, r=Mark-Simulacrum

BTreeMap: type-specific variants of node_as_mut and cast_unchecked

Improves debug checking and shortens some expressions. Extracted from #77408

3 years agoRollup merge of #77239 - shepmaster:silicon-ci-plus, r=pietroalbini
Yuki Okushi [Tue, 13 Oct 2020 21:02:12 +0000 (06:02 +0900)]
Rollup merge of #77239 - shepmaster:silicon-ci-plus, r=pietroalbini

Enable building Cargo for aarch64-apple-darwin

r? @ghost

3 years agoAuto merge of #75213 - dingxiangfei2009:yield-point-in-match-guard, r=tmandry
bors [Tue, 13 Oct 2020 20:20:27 +0000 (20:20 +0000)]
Auto merge of #75213 - dingxiangfei2009:yield-point-in-match-guard, r=tmandry

[generator] Special cases for match guard when analyzing interior types in generators

Fix #72651

This proposes one of ways to fix the mentioned issue. One cause of #72651 is that the interior type analysis misses out types of match pattern locals. Those locals are manifested as temporary borrows in the scopes of match arm guards. If uses of these locals appear after yield points, the borrows from them were not considered live across the yield points. However, this is not the case since the borrowing always happens at the very beginning of the match guard.

This calls for special treatment to analysis of types appearing in the match guard. Those borrows are recorded as the HIR tree is walked by `InteriorVisitor` and their uses are recorded whenever a yield point is crossed.

3 years agoAdd a target option for selecting a DWARF version
Austin Shafer [Fri, 9 Oct 2020 19:08:18 +0000 (15:08 -0400)]
Add a target option for selecting a DWARF version

Certain platforms need to limit the DWARF version emitted (oxs, *bsd). This
change adds a dwarf_version entry to the options that allows a platform to
specify the dwarf version to use. By default this option is none and the default
DWARF version is selected.

Also adds an option for printing Option<u32> json keys

3 years agoReplace trivial bool matches with the `matches!` macro
LingMan [Mon, 12 Oct 2020 19:46:15 +0000 (21:46 +0200)]
Replace trivial bool matches with the `matches!` macro

3 years agobootstrap: set correct path for the build-manifest binary
Pietro Albini [Tue, 13 Oct 2020 18:37:38 +0000 (20:37 +0200)]
bootstrap: set correct path for the build-manifest binary

3 years agoAdd regression issue template
Camelid [Thu, 8 Oct 2020 21:45:25 +0000 (14:45 -0700)]
Add regression issue template

3 years agoDeny unsafe_op_in_unsafe_fn for unsupported/common.rs through sys/wasm too.
Mara Bos [Tue, 13 Oct 2020 16:52:57 +0000 (18:52 +0200)]
Deny unsafe_op_in_unsafe_fn for unsupported/common.rs through sys/wasm too.

3 years agoexplanatory comments and fix guard binding stack
Ding Xiang Fei [Tue, 13 Oct 2020 16:50:30 +0000 (00:50 +0800)]
explanatory comments and fix guard binding stack

3 years agodedicated visitor for arm patterns
Ding Xiang Fei [Wed, 7 Oct 2020 04:58:02 +0000 (12:58 +0800)]
dedicated visitor for arm patterns

3 years agoswitch the test to an actual MCVE
Ding Xiang Fei [Wed, 19 Aug 2020 01:04:40 +0000 (09:04 +0800)]
switch the test to an actual MCVE

3 years agorustfmt
Ding Xiang Fei [Thu, 6 Aug 2020 08:20:06 +0000 (16:20 +0800)]
rustfmt

3 years agotest derived from #74961
Ding Xiang Fei [Thu, 6 Aug 2020 08:18:46 +0000 (16:18 +0800)]
test derived from #74961

3 years agoalso record the types of borrows from the pattern locals in match guards
Ding Xiang Fei [Thu, 6 Aug 2020 07:37:12 +0000 (15:37 +0800)]
also record the types of borrows from the pattern locals in match guards

so that it reflects the fact that borrowing these pattern locals is happening
before any yield points in match guards

3 years agodocumentation fix
Ding Xiang Fei [Thu, 6 Aug 2020 07:36:57 +0000 (15:36 +0800)]
documentation fix

3 years agoaarch64-apple-darwin now includes Cargo
Jake Goulding [Tue, 13 Oct 2020 15:00:03 +0000 (11:00 -0400)]
aarch64-apple-darwin now includes Cargo

3 years ago Give an error when running `x.py test --stage 0 src/test/ui`
Joshua Nelson [Sat, 10 Oct 2020 03:15:16 +0000 (23:15 -0400)]
 Give an error when running `x.py test --stage 0 src/test/ui`

3 years agoAuto merge of #75406 - mati865:mingw-aslr, r=Mark-Simulacrum
bors [Tue, 13 Oct 2020 14:12:08 +0000 (14:12 +0000)]
Auto merge of #75406 - mati865:mingw-aslr, r=Mark-Simulacrum

Enable ASLR for windows-gnu

Fixes https://github.com/rust-lang/rust/issues/16514
Fixes https://github.com/rust-lang/rust/issues/16593
Fixes https://github.com/rust-lang/rust/issues/17684

Passes the tests for me with x86_64 toolchain.

3 years agoAdd note about using cells in the locks on the 'unsupported' platform.
Mara Bos [Tue, 13 Oct 2020 13:29:38 +0000 (15:29 +0200)]
Add note about using cells in the locks on the 'unsupported' platform.

3 years agoReplace absolute paths with relative ones
est31 [Tue, 13 Oct 2020 08:17:05 +0000 (10:17 +0200)]
Replace absolute paths with relative ones

Modern compilers allow reaching external crates
like std or core via relative paths in modules
outside of lib.rs and main.rs.

3 years agoAuto merge of #77762 - pietroalbini:dist-build-manifest, r=Mark-Simulacrum
bors [Tue, 13 Oct 2020 12:11:47 +0000 (12:11 +0000)]
Auto merge of #77762 - pietroalbini:dist-build-manifest, r=Mark-Simulacrum

Dist build manifest

This PR makes two changes that should remove a significant chunk of the time spent in our release process: cloning the `rust-lang/rust` monorepo, all its submodules, and building `bootstrap` to then invoke `build-manifest`:

* `build-manifest` doesn't rely on a clone of the monorepo being present anymore. The only remaining bit of information it fetched from it (the Rust version) is instead bundled in the binary.
* A new "component" is added, `build-manifest`. That component includes a prebuilt version of the tool, and it's *not* included in the Rustup manifest. This will allow `promote-release` to directly invoke the tool without interacting with our build system.
* The Linux x86_64 CI is changed to also build the component mentioned above. It's the only CI builder tasked to do so, and to cleanly support this a new `--include-default-paths` flag was added to `./x.py`.
* The `BUILD_MANIFEST_NUM_THREADS` environment variable is added to configure the number of threads at runtime.

This PR is best reviewed commit-by-commit.
r? `@Mark-Simulacrum`

3 years agoInclude aarch64-apple-darwin in the dist manifests
Jake Goulding [Tue, 13 Oct 2020 11:19:54 +0000 (07:19 -0400)]
Include aarch64-apple-darwin in the dist manifests

3 years agoAuto merge of #77755 - bugadani:perf-calc-dtor, r=ecstatic-morse
bors [Tue, 13 Oct 2020 10:19:30 +0000 (10:19 +0000)]
Auto merge of #77755 - bugadani:perf-calc-dtor, r=ecstatic-morse

Monomorphize `calculate_dtor` instead of using function pointers

Change `calculate_dtor` to avoid dynamic dispatching. This change allows the empty functions to be optimized away.

Based on the discussion in https://github.com/rust-lang/rust/pull/77754#discussion_r502498970, the performance impact of this change was measured.

Perf run results: https://perf.rust-lang.org/compare.html?start=7bc5839e99411aad9061a632b62075d1346cbb3b&end=ffec759ae9bbc4d6d2235ff40ade6723a85bc7cc

3 years agoAuto merge of #77759 - tblah:fix_riscv_qemu, r=pietroalbini
bors [Tue, 13 Oct 2020 08:27:01 +0000 (08:27 +0000)]
Auto merge of #77759 - tblah:fix_riscv_qemu, r=pietroalbini

ci: Fix riscv64gc linux test QEMU fault, plus doc link fix

Newer versions of the `qemu` package (used for riscv64gc-unknown-linux-gnu testing) don't work with the version of the RISC-V bootloader we were using. https://github.com/rust-lang/rust/commit/a4a0342cf59a1bff43ed79586065eb97dba0cddb  bumps to a revision which should fix the problem.

https://github.com/rust-lang/rust/commit/e0b033e965a7d422da70a409a028af7c8b64e709 fixes a documentation failure I encountered while running the tests.

3 years agoAuto merge of #77639 - jagill:stabilize-slice_partition_at_index, r=Amanieu
bors [Tue, 13 Oct 2020 06:33:52 +0000 (06:33 +0000)]
Auto merge of #77639 - jagill:stabilize-slice_partition_at_index, r=Amanieu

Stabilize slice_partition_at_index

This stabilizes slice_partition_at_index, including renaming `partition_at_index*` -> `select_nth_unstable*`.

Closes #55300

r? `@Amanieu`

3 years agoAuto merge of #76196 - r-52:r-coverage-allow-missing-docs, r=jyn514
bors [Tue, 13 Oct 2020 04:41:08 +0000 (04:41 +0000)]
Auto merge of #76196 - r-52:r-coverage-allow-missing-docs, r=jyn514

rustdoc: skip #[allow(missing docs)] for docs in coverage report

During the document coverage reporting with:
```bash
rustdoc something.rs -Z unstable-options --show-coverage
```

the coverage report counts code that is marked with `#[allow(missing_docs)]` for the calculation, which outputs lower numbers in the coverage report even though these parts should be ignored for the calculation.

Right now I'm not sure how this can be tested (CI)? (I verified it by hand and ran the unit tests)

r? `@jyn514`

**Reference:** Fixes #76121

3 years agoAuto merge of #76830 - Artoria2e5:tune, r=nagisa
bors [Tue, 13 Oct 2020 02:49:00 +0000 (02:49 +0000)]
Auto merge of #76830 - Artoria2e5:tune, r=nagisa

Pass tune-cpu to LLVM

I think this is how it should work...

See https://internals.rust-lang.org/t/expose-tune-cpu-from-llvm/13088 for the background. Or the documentation diff.

3 years agoUse Option::unwrap_or instead of open-coding it
LingMan [Mon, 12 Oct 2020 23:05:35 +0000 (01:05 +0200)]
Use Option::unwrap_or instead of open-coding it

3 years agoAuto merge of #77796 - jonas-schievink:switchint-refactor, r=oli-obk
bors [Tue, 13 Oct 2020 00:57:03 +0000 (00:57 +0000)]
Auto merge of #77796 - jonas-schievink:switchint-refactor, r=oli-obk

Refactor how SwitchInt stores jump targets

Closes https://github.com/rust-lang/rust/issues/65693

3 years agoAuto merge of #77792 - matthewjasper:instrument-trait-selection, r=oli-obk
bors [Mon, 12 Oct 2020 23:04:55 +0000 (23:04 +0000)]
Auto merge of #77792 - matthewjasper:instrument-trait-selection, r=oli-obk

Use tracing spans in rustc_trait_selection

Spans are very helpful when debugging this code. It's also hot enough to make a good benchmark.

r? `@oli-obk`

3 years agoBless expected errors
Ethan Brierley [Mon, 12 Oct 2020 21:27:59 +0000 (22:27 +0100)]
Bless expected errors

3 years agoInclude `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component
Aaron Hill [Mon, 12 Oct 2020 20:02:48 +0000 (16:02 -0400)]
Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component

Fixes #55890

It's useful to have `llc` and `opt` available when debugging an LLVM
miscompilation,.

3 years agoAuto merge of #77847 - Xanewok:update-rls, r=Xanewok
bors [Mon, 12 Oct 2020 21:03:35 +0000 (21:03 +0000)]
Auto merge of #77847 - Xanewok:update-rls, r=Xanewok

Update RLS

cc #77819
Fixes #77810

r? `@ghost`

3 years agoA little rewording
Ethan Brierley [Mon, 12 Oct 2020 20:58:06 +0000 (15:58 -0500)]
A little rewording

Co-authored-by: varkor <github@varkor.com>
3 years agoRemove a little jargon from error
Ethan Brierley [Mon, 12 Oct 2020 20:57:04 +0000 (15:57 -0500)]
Remove a little jargon from error

Co-authored-by: varkor <github@varkor.com>
3 years agoConfigure jemalloc for cross-compilation to aarch64-apple-darwin
Jake Goulding [Sun, 27 Sep 2020 17:27:29 +0000 (13:27 -0400)]
Configure jemalloc for cross-compilation to aarch64-apple-darwin

3 years agoAuto merge of #77867 - JohnTitor:rollup-0odg1n4, r=JohnTitor
bors [Mon, 12 Oct 2020 19:09:08 +0000 (19:09 +0000)]
Auto merge of #77867 - JohnTitor:rollup-0odg1n4, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #77550 (add shims for WithOptConstParam query calls)
 - #77699 (Add word wrap for short descriptions)
 - #77724 (Implement `AsRawFd` for `StdinLock` etc. on WASI.)
 - #77746 (Fix `x.py setup` sets `changelog-seen`)
 - #77784 (Fix intra-docs link in core::ffi::VaList)
 - #77811 (rustdoc: Make some functions private that don't need to be public)
 - #77818 (Mono collector: replace pair of ints with Range)
 - #77831 (Use std methods on char instead of open coding them)
 - #77852 (update url in bootstrap README (gcc-rs -> cc-rs))
 - #77863 (Remove `mark-i-m` from rustc-dev-guide maintainers)

Failed merges:

r? `@ghost`

3 years agoRollup merge of #77863 - JohnTitor:remove-mark-i-m, r=pietroalbini
Yuki Okushi [Mon, 12 Oct 2020 19:08:07 +0000 (04:08 +0900)]
Rollup merge of #77863 - JohnTitor:remove-mark-i-m, r=pietroalbini

Remove `mark-i-m` from rustc-dev-guide maintainers

They aren't a maintainer anymore and it causes failure on our CI now: https://github.com/rust-lang-ci/rust/runs/1243600577

3 years agoRollup merge of #77852 - 12101111:fix-bootstrap-doc, r=jonas-schievink
Yuki Okushi [Mon, 12 Oct 2020 19:08:05 +0000 (04:08 +0900)]
Rollup merge of #77852 - 12101111:fix-bootstrap-doc, r=jonas-schievink

update url in bootstrap README (gcc-rs -> cc-rs)

gcc-rs is renamed to cc-rs 3 years ago.

3 years agoRollup merge of #77831 - LingMan:use_std, r=jonas-schievink
Yuki Okushi [Mon, 12 Oct 2020 19:08:03 +0000 (04:08 +0900)]
Rollup merge of #77831 - LingMan:use_std, r=jonas-schievink

Use std methods on char instead of open coding them

3 years agoRollup merge of #77818 - bugadani:range, r=oli-obk
Yuki Okushi [Mon, 12 Oct 2020 19:08:02 +0000 (04:08 +0900)]
Rollup merge of #77818 - bugadani:range, r=oli-obk

Mono collector: replace pair of ints with Range

I found the initial PR (#33171) that introduced this piece of code but I didn't find any information about why a tuple was preferred over a `Range<usize>`.

I'm hoping there are no technical reasons to not do this.

3 years agoRollup merge of #77811 - jyn514:private, r=GuillaumeGomez
Yuki Okushi [Mon, 12 Oct 2020 19:08:00 +0000 (04:08 +0900)]
Rollup merge of #77811 - jyn514:private, r=GuillaumeGomez

rustdoc: Make some functions private that don't need to be public

r? @GuillaumeGomez

3 years agoRollup merge of #77784 - aDotInTheVoid:ffi-sealed_trait-intra-docs, r=jyn514
Yuki Okushi [Mon, 12 Oct 2020 19:07:58 +0000 (04:07 +0900)]
Rollup merge of #77784 - aDotInTheVoid:ffi-sealed_trait-intra-docs, r=jyn514

Fix intra-docs link in core::ffi::VaList

At some point, `VaList` was changes to be a [wrapper](https://github.com/rust-lang/rust/blob/1661f77/library/core/src/ffi.rs#L177-L201) over `VaListImpl`, and now the `Arg` method exists on [`VaListImpl`](https://github.com/rust-lang/rust/blob/1661f77/library/core/src/ffi.rs#L333-L336). This PR fixes the intradoc links so that when `--document-private-items` is ran on std (via [patch](https://gist.github.com/aDotInTheVoid/42c82306210203f9c9093c952b765ab4)), it works

3 years agoRollup merge of #77746 - winnayx:issue-77572-fix, r=jyn514
Yuki Okushi [Mon, 12 Oct 2020 19:07:56 +0000 (04:07 +0900)]
Rollup merge of #77746 - winnayx:issue-77572-fix, r=jyn514

Fix `x.py setup` sets `changelog-seen`

Fixes #77572 by setting changelog-seen in setup.rs

3 years agoRollup merge of #77724 - sunfishcode:stdinlock-asrawfd, r=alexcrichton
Yuki Okushi [Mon, 12 Oct 2020 19:07:54 +0000 (04:07 +0900)]
Rollup merge of #77724 - sunfishcode:stdinlock-asrawfd, r=alexcrichton

Implement `AsRawFd` for `StdinLock` etc. on WASI.

WASI implements `AsRawFd` for `Stdin`, `Stdout`, and `Stderr`, so
implement it for `StdinLock`, `StdoutLock`, and `StderrLock` as well.

r? @alexcrichton

3 years agoRollup merge of #77699 - GuillaumeGomez:word-wrap, r=XAMPPRocky
Yuki Okushi [Mon, 12 Oct 2020 19:07:52 +0000 (04:07 +0900)]
Rollup merge of #77699 - GuillaumeGomez:word-wrap, r=XAMPPRocky

Add word wrap for short descriptions

Fixes #77652

![Screenshot from 2020-10-08 13-26-18](https://user-images.githubusercontent.com/3050060/95452770-11845280-096a-11eb-80da-723da85261fa.png)

cc @WaffleLapkin
r? @jyn514

3 years agoRollup merge of #77550 - lcnr:ty-dep-path-ct-cleanup, r=ecstatic-morse
Yuki Okushi [Mon, 12 Oct 2020 19:07:50 +0000 (04:07 +0900)]
Rollup merge of #77550 - lcnr:ty-dep-path-ct-cleanup, r=ecstatic-morse

add shims for WithOptConstParam query calls

r? @ecstatic-morse @eddyb

3 years agoRemove `mark-i-m` from rustc-dev-guide maintainers
Yuki Okushi [Mon, 12 Oct 2020 18:13:00 +0000 (03:13 +0900)]
Remove `mark-i-m` from rustc-dev-guide maintainers

3 years agoEnable building Cargo for aarch64-apple-darwin
Jake Goulding [Sat, 26 Sep 2020 13:42:04 +0000 (09:42 -0400)]
Enable building Cargo for aarch64-apple-darwin

3 years agoUpgrade OpenSSL to 1.1.1h and add support for aarch64-apple-darwin
Jake Goulding [Mon, 12 Oct 2020 17:56:07 +0000 (13:56 -0400)]
Upgrade OpenSSL to 1.1.1h and add support for aarch64-apple-darwin

3 years agobuild-manifest: bundle the rustc version in the binary
Pietro Albini [Mon, 12 Oct 2020 17:40:35 +0000 (19:40 +0200)]
build-manifest: bundle the rustc version in the binary

3 years agobuild-manifest: use var_os instead of var to check if vars exist
Pietro Albini [Mon, 12 Oct 2020 17:34:01 +0000 (19:34 +0200)]
build-manifest: use var_os instead of var to check if vars exist

This will prevent the tool mistakenly ignoring the variables if they
happen to contain non-utf8 data.

3 years agobuild-manifest: allow configuring the number of threads
Pietro Albini [Mon, 12 Oct 2020 15:47:37 +0000 (17:47 +0200)]
build-manifest: allow configuring the number of threads

3 years agoci: also build the build-manifest component on dist-x86_64-linux
Pietro Albini [Fri, 9 Oct 2020 17:53:48 +0000 (19:53 +0200)]
ci: also build the build-manifest component on dist-x86_64-linux

3 years agobootstrap: add --include-default-paths to ./x.py
Pietro Albini [Fri, 9 Oct 2020 17:51:07 +0000 (19:51 +0200)]
bootstrap: add --include-default-paths to ./x.py

3 years agobootstrap: add disabled by default build-manifest dist component
Pietro Albini [Fri, 9 Oct 2020 17:49:13 +0000 (19:49 +0200)]
bootstrap: add disabled by default build-manifest dist component

3 years agobuild-manifest: accept the Rust version instead of the monorepo path
Pietro Albini [Fri, 9 Oct 2020 13:34:57 +0000 (15:34 +0200)]
build-manifest: accept the Rust version instead of the monorepo path

This commit changes the way build-manifest is invoked, to let it accept
the Rust version directly instead of requiring the path of the Rust
monorepo and letting build-manifest figure out the path on its own.

This allows to run build-manifest without a clone of the monorepo.

3 years agoAuto merge of #77854 - pietroalbini:ETOOMANYCHANNELS, r=Mark-Simulacrum
bors [Mon, 12 Oct 2020 15:50:36 +0000 (15:50 +0000)]
Auto merge of #77854 - pietroalbini:ETOOMANYCHANNELS, r=Mark-Simulacrum

build-manifest: stop generating numbered channel names except for stable

This fixes numbered channel names being created for the nightly channel, and once the root cause of this rides the trains, for beta.

r? `@Mark-Simulacrum`

3 years agobuild-manifest: stop generating numbered channel names except for stable
Pietro Albini [Mon, 12 Oct 2020 15:39:13 +0000 (17:39 +0200)]
build-manifest: stop generating numbered channel names except for stable

This fixes numbered channel names being created for the nightly channel,
and once the root cause of this rides the trains, for beta.

3 years agoAdd word-wrap rule for short descriptions
Guillaume Gomez [Thu, 8 Oct 2020 11:25:36 +0000 (13:25 +0200)]
Add word-wrap rule for short descriptions

3 years agoupdate url in bootstrap README
12101111 [Mon, 12 Oct 2020 13:17:11 +0000 (21:17 +0800)]
update url in bootstrap README

3 years agoExtend test to ensure that items inherit lint level from the parent
Guillaume Gomez [Mon, 12 Oct 2020 12:32:41 +0000 (14:32 +0200)]
Extend test to ensure that items inherit lint level from the parent

3 years agoMake error help clearer
Ethan Brierley [Mon, 12 Oct 2020 12:18:29 +0000 (07:18 -0500)]
Make error help clearer

Co-authored-by: varkor <github@varkor.com>
3 years agoAuto merge of #77821 - tmiasko:discriminant-value-is-safe, r=jonas-schievink
bors [Mon, 12 Oct 2020 12:12:54 +0000 (12:12 +0000)]
Auto merge of #77821 - tmiasko:discriminant-value-is-safe, r=jonas-schievink

Remove unnecessary unsafe block around calls to discriminant_value

Since 63793 the discriminant_value intrinsic is safe to call. Remove
unnecessary unsafe block around calls to this intrinsic in built-in
derive macros.

3 years agoImprove lint level handling
Guillaume Gomez [Mon, 12 Oct 2020 11:48:45 +0000 (13:48 +0200)]
Improve lint level handling

3 years agoApply same treatment to MISSING_DOC_CODE_EXAMPLES
Guillaume Gomez [Thu, 8 Oct 2020 16:20:00 +0000 (18:20 +0200)]
Apply same treatment to MISSING_DOC_CODE_EXAMPLES

3 years agoInherit lint level from parents
Guillaume Gomez [Thu, 8 Oct 2020 16:05:01 +0000 (18:05 +0200)]
Inherit lint level from parents

3 years agorustdoc: skip allow missing doc in cover. report
Roman [Tue, 1 Sep 2020 12:19:24 +0000 (14:19 +0200)]
rustdoc: skip allow missing doc in cover. report

During the document coverage reporting with
```bash
rustdoc something.rs -Z unstable-options --show-coverage
```

the coverage report also includes parts of the code that are marked
with `#[allow(missing_docs)]`, which outputs lower numbers in the
coverage report even though these parts should be ignored for the
calculation.

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
3 years agoUpdate RLS
Igor Matuszewski [Mon, 12 Oct 2020 11:10:43 +0000 (13:10 +0200)]
Update RLS

3 years agoAuto merge of #75914 - arlosi:aarch64-ci, r=pietroalbini
bors [Mon, 12 Oct 2020 10:17:48 +0000 (10:17 +0000)]
Auto merge of #75914 - arlosi:aarch64-ci, r=pietroalbini

Promote aarch64-pc-windows-msvc to Tier 2 Development Platform

Adds a GitHub Actions CI build for `aarch64-pc-windows-msvc` via cross-compilation on an x86_64 host.

This promotes `aarch64-pc-windows-msvc` from a Tier 2 Compilation Target (std) to a Tier 2 Development Platform (std+rustc+cargo+tools).

Fixes #72881

r? `@pietroalbini`

3 years agoAuto merge of #77837 - Aaron1011:bump-miri-backtrace, r=RalfJung
bors [Mon, 12 Oct 2020 08:25:38 +0000 (08:25 +0000)]
Auto merge of #77837 - Aaron1011:bump-miri-backtrace, r=RalfJung

Bump miri

Fixes https://github.com/rust-lang/rust/issues/77791

r? `@RalfJung`

3 years agoAuto merge of #75956 - jonas-schievink:lto-opt-sz, r=tmiasko
bors [Mon, 12 Oct 2020 06:10:50 +0000 (06:10 +0000)]
Auto merge of #75956 - jonas-schievink:lto-opt-sz, r=tmiasko

Fix -Clinker-plugin-lto with opt-levels s and z

Pass s and z as `-plugin-opt=O2` to the linker. This is what `-Os` and `-Oz` correspond to, apparently.

Fixes https://github.com/rust-lang/rust/issues/75940

3 years agoAuto merge of #77819 - mati865:crossbeam-ub, r=Mark-Simulacrum
bors [Mon, 12 Oct 2020 04:18:56 +0000 (04:18 +0000)]
Auto merge of #77819 - mati865:crossbeam-ub, r=Mark-Simulacrum

Update crossbeam-channel to avoid UB

More info: https://github.com/RustSec/advisory-db/pull/425

3 years agoStabilize slice_select_nth_unstable
James Gill [Wed, 7 Oct 2020 01:54:05 +0000 (21:54 -0400)]
Stabilize slice_select_nth_unstable

This stabilizes the functionality in slice_partition_at_index,
but under the names `select_nth_unstable*`.  The functions
`partition_at_index*` are left as deprecated, to be removed in
a later release.

Closes #55300

3 years agoAuto merge of #77790 - jyn514:undivided, r=ollie27
bors [Mon, 12 Oct 2020 02:20:04 +0000 (02:20 +0000)]
Auto merge of #77790 - jyn514:undivided, r=ollie27

Show summary lines on cross-crate re-exports

See my write-up in https://github.com/rust-lang/rust/issues/77783#issuecomment-706551743 for what's going on here.

Fixes https://github.com/rust-lang/rust/issues/77783

r? `@ollie27`

3 years agoRemove unnecessary `RefCell` for doc_strings
Joshua Nelson [Mon, 12 Oct 2020 00:31:00 +0000 (20:31 -0400)]
Remove unnecessary `RefCell` for doc_strings

This was there for `Divider` and is no longer necessary.

3 years agoShow summary lines on cross-crate re-exports
Joshua Nelson [Mon, 12 Oct 2020 00:27:17 +0000 (20:27 -0400)]
Show summary lines on cross-crate re-exports

This removes the unnecessary `DocFragmentKind::Divider` in favor of just
using the logic I actually want in `collapse_docs`.

3 years agoUse no-prefer-dynamic
Jonas Schievink [Sun, 11 Oct 2020 23:51:40 +0000 (01:51 +0200)]
Use no-prefer-dynamic

3 years agoBump miri
Aaron Hill [Sun, 11 Oct 2020 22:09:27 +0000 (18:09 -0400)]
Bump miri

3 years agoFix -Clinker-plugin-lto with opt-levels s and z
Jonas Schievink [Wed, 26 Aug 2020 20:11:53 +0000 (22:11 +0200)]
Fix -Clinker-plugin-lto with opt-levels s and z

3 years agoAuto merge of #75991 - shepmaster:silicon-ci, r=pietroalbini
bors [Sun, 11 Oct 2020 23:23:48 +0000 (23:23 +0000)]
Auto merge of #75991 - shepmaster:silicon-ci, r=pietroalbini

Set up CI for aarch64-apple-darwin

3 years agoUpdate crossbeam-channel to avoid UB
Mateusz Mikuła [Sun, 11 Oct 2020 14:19:35 +0000 (16:19 +0200)]
Update crossbeam-channel to avoid UB

3 years agoAuto merge of #76859 - Aaron1011:fix/llvm-cgu-reuse, r=davidtwco,nikic
bors [Sun, 11 Oct 2020 20:50:02 +0000 (20:50 +0000)]
Auto merge of #76859 - Aaron1011:fix/llvm-cgu-reuse, r=davidtwco,nikic

Use llvm::computeLTOCacheKey to determine post-ThinLTO CGU reuse

During incremental ThinLTO compilation, we attempt to re-use the
optimized (post-ThinLTO) bitcode file for a module if it is 'safe' to do
so.

Up until now, 'safe' has meant that the set of modules that our current
modules imports from/exports to is unchanged from the previous
compilation session. See PR #67020 and PR #71131 for more details.

However, this turns out be insufficient to guarantee that it's safe
to reuse the post-LTO module (i.e. that optimizing the pre-LTO module
would produce the same result). When LLVM optimizes a module during
ThinLTO, it may look at other information from the 'module index', such
as whether a (non-imported!) global variable is used. If this
information changes between compilation runs, we may end up re-using an
optimized module that (for example) had dead-code elimination run on a
function that is now used by another module.

Fortunately, LLVM implements its own ThinLTO module cache, which is used
when ThinLTO is performed by a linker plugin (e.g. when clang is used to
compile a C proect). Using this cache directly would require extensive
refactoring of our code - but fortunately for us, LLVM provides a
function that does exactly what we need.

The function `llvm::computeLTOCacheKey` is used to compute a SHA-1 hash
from all data that might influence the result of ThinLTO on a module.
In addition to the module imports/exports that we manually track, it
also hashes information about global variables (e.g. their liveness)
which might be used during optimization. By using this function, we
shouldn't have to worry about new LLVM passes breaking our module re-use
behavior.

In LLVM, the output of this function forms part of the filename used to
store the post-ThinLTO module. To keep our current filename structure
intact, this PR just writes out the mapping 'CGU name -> Hash' to a
file. To determine if a post-LTO module should be reused, we compare
hashes from the previous session.

This should unblock PR #75199 - by sheer chance, it seems to have hit
this issue due to the particular CGU partitioning and optimization
decisions that end up getting made.

3 years agoMostly print statements to see where things are
Winnie Xiao [Tue, 6 Oct 2020 21:20:51 +0000 (23:20 +0200)]
Mostly print statements to see where things are

More print statementsstatements lol

Solved the basic case of eliminating check_version ifk_version if subcommand = setup

Finished v1

checking out old bootstrap.py

checked out old irrelevant files

fixed tidy

Moved VERSION from bin/main.rs to lib.rs

Fixed semicolon return issue

x.py fmt

3 years agoSimplify using is_ascii_alphabetic and is_ascii_alphanumeric
LingMan [Wed, 23 Sep 2020 04:49:42 +0000 (06:49 +0200)]
Simplify using is_ascii_alphabetic and is_ascii_alphanumeric