Commit Graph

129677 Commits

Author SHA1 Message Date
Yuki Okushi
7de5fe76f2
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](0c03aee8b8/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
2020-10-14 06:02:19 +09:00
Yuki Okushi
6a596210a6
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
2020-10-14 06:02:17 +09:00
Yuki Okushi
16612a9292
Rollup merge of #77239 - shepmaster:silicon-ci-plus, r=pietroalbini
Enable building Cargo for aarch64-apple-darwin

r? @ghost
2020-10-14 06:02:12 +09:00
bors
adef9da30f 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.
2020-10-13 20:20:27 +00:00
Austin Shafer
4511f8b9f3 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
2020-10-13 15:56:30 -04:00
LingMan
7a23a71e51 Replace trivial bool matches with the matches! macro 2020-10-13 21:29:38 +02:00
Pietro Albini
6091538105
bootstrap: set correct path for the build-manifest binary 2020-10-13 20:37:38 +02:00
Wim Looman
4409cb2e38 Make portability log at debug level 2020-10-13 20:21:49 +02:00
Wim Looman
4e263fe999 Add test-examples for Cfg::simplify_with 2020-10-13 20:18:46 +02:00
Camelid
91cc3d2c42 Add regression issue template 2020-10-13 11:09:04 -07:00
Mara Bos
af414dc274 Deny unsafe_op_in_unsafe_fn for unsupported/common.rs through sys/wasm too. 2020-10-13 18:56:27 +02:00
Ding Xiang Fei
50627a39c1
explanatory comments and fix guard binding stack 2020-10-14 00:51:00 +08:00
Ding Xiang Fei
4a8ba7b031
dedicated visitor for arm patterns 2020-10-14 00:50:59 +08:00
Ding Xiang Fei
df127b86cb
switch the test to an actual MCVE 2020-10-14 00:50:58 +08:00
Ding Xiang Fei
66345d9359
rustfmt 2020-10-14 00:50:57 +08:00
Ding Xiang Fei
323f0794c0
test derived from #74961 2020-10-14 00:50:56 +08:00
Ding Xiang Fei
7f5721c3f4
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
2020-10-14 00:50:55 +08:00
Ding Xiang Fei
f9ccd39ae3
documentation fix 2020-10-14 00:50:54 +08:00
Antoine Martin
b8ae4c5e36 Handle included config in bootstrap.py 2020-10-13 18:08:02 +02:00
Antoine Martin
ab614b0f01 Implement "if-available" option for download-ci-llvm 2020-10-13 18:00:25 +02:00
Jake Goulding
8b6e3460db aarch64-apple-darwin now includes Cargo 2020-10-13 11:00:03 -04:00
Joshua Nelson
b7080e6fd4 Give an error when running x.py test --stage 0 src/test/ui 2020-10-13 10:33:32 -04:00
bors
d65c08e9cc 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.
2020-10-13 14:12:08 +00:00
Thomas de Zeeuw
8c0c7ec4ec Use fdatasync for File::sync_data on more OSes
Add support for the following OSes:
 * Android
 * FreeBSD: https://www.freebsd.org/cgi/man.cgi?query=fdatasync&sektion=2
 * OpenBSD: https://man.openbsd.org/OpenBSD-5.8/fsync.2
 * NetBSD: https://man.netbsd.org/fdatasync.2
 * illumos: https://illumos.org/man/3c/fdatasync
2020-10-13 15:57:31 +02:00
Mara Bos
b26aa5d973 Add note about using cells in the locks on the 'unsupported' platform. 2020-10-13 15:29:38 +02:00
est31
a0fc455d30 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.
2020-10-13 14:16:45 +02:00
bors
d772879df3 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`
2020-10-13 12:11:47 +00:00
Guillaume Gomez
7beeb07c1e Clean up rustdoc passes 2020-10-13 13:24:29 +02:00
Jake Goulding
45a34fc66c Include aarch64-apple-darwin in the dist manifests 2020-10-13 07:19:54 -04:00
Guillaume Gomez
0009cbaabd Add check for HTML comments 2020-10-13 12:53:24 +02:00
bors
2d6eccdb67 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
2020-10-13 10:19:30 +00:00
nasso
db7c8f4c3c Coding style fixes 2020-10-13 10:46:30 +02:00
nasso
3a6437cd98 Remove unnecessary refs 2020-10-13 10:46:22 +02:00
nasso
45f6762529 Add a setting to use the system theme 2020-10-13 10:46:21 +02:00
bors
e8529c79cc 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. a4a0342cf5  bumps to a revision which should fix the problem.

e0b033e965 fixes a documentation failure I encountered while running the tests.
2020-10-13 08:27:01 +00:00
bors
ec40181913 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`
2020-10-13 06:33:52 +00:00
bors
4d63435aae 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
2020-10-13 04:41:08 +00:00
bors
f54072bb81 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.
2020-10-13 02:49:00 +00:00
LingMan
61e722f331 Use Option::unwrap_or instead of open-coding it 2020-10-13 04:30:17 +02:00
Camelid
95221b4eb5 Use intra-doc links for links to module-level docs 2020-10-12 19:22:47 -07:00
bors
afb4514c09 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
2020-10-13 00:57:03 +00:00
bors
abbdec3be6 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`
2020-10-12 23:04:55 +00:00
Ethan Brierley
79351b1d4a Bless expected errors 2020-10-12 22:27:59 +01:00
Aaron Hill
c16c8acae1
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,.
2020-10-12 17:05:48 -04:00
bors
8dae8cdcc8 Auto merge of #77847 - Xanewok:update-rls, r=Xanewok
Update RLS

cc #77819
Fixes #77810

r? `@ghost`
2020-10-12 21:03:35 +00:00
Ethan Brierley
facb38d1dc
A little rewording
Co-authored-by: varkor <github@varkor.com>
2020-10-12 15:58:06 -05:00
Ethan Brierley
e62da8ff0b
Remove a little jargon from error
Co-authored-by: varkor <github@varkor.com>
2020-10-12 15:57:04 -05:00
Jake Goulding
eb0c996ee2 Configure jemalloc for cross-compilation to aarch64-apple-darwin 2020-10-12 16:36:46 -04:00
Guillaume Gomez
861b8921c0 Clean up rustdoc HTML tags check pass 2020-10-12 21:32:36 +02:00
Nicholas-Baron
ce7c73c5a5 Made a submodule for fn_ctxt 2020-10-12 12:18:24 -07:00