103784 Commits

Author SHA1 Message Date
Mark Rousskov
a68d5314fb Add toolstate checking into bootstrap
This is not yet actually used by CI, but implements the logic for
checking that tools are properly building on beta/stable and during beta
cutoff week.

This attempts to mirror the checking functionality in
src/ci/docker/x86_64-gnu-tools/checktools.sh, and called scripts. It
does not attempt to run the relevant steps (that functionality was
originally desired to be moved into bootstrap as well, but doing so
proved more difficult than expected).

This is intended as a way to centralize and make clearer the logic
involved in toolstate checking. In particular, the previous logic was
spread across numerous python and shell scripts in such a way that made
interpretation quite difficult.
2019-12-10 09:26:34 -05:00
Remy Rakic
e0481d1d40 add polonius activities to -Z self-profile
- "polonius_fact_generation" is dedicated to profiling the Polonius fact generation, from the MIR and NLL constraints
- "polonius_analysis" is dedicated to profiling the duration of the Polonius computations themselves: move/init analysis, liveness, borrowck-ing
2019-12-10 11:44:44 +01:00
Remy Rakic
72579c9444 cleanup polonius liveness fact generation: refactor some type names
- singular instead of plurals for a relation
- terminology: use "Path"s instead of "MovePath"s
2019-12-10 11:44:44 +01:00
Remy Rakic
d18bfd647e cleanup polonius liveness fact generation: fix debug! logs 2019-12-10 11:44:44 +01:00
Remy Rakic
cd9ec277c5 cleanup polonius liveness fact generation: mir visitor
have a variable instead of calling a method while constructing the extractor
2019-12-10 11:44:44 +01:00
Remy Rakic
e6d8fbede2 cleanup polonius liveness fact generation
For the var_uses_region and var_drops_region relations:
- check for all facts existence only once
- remove function only used once
- pull var_uses_region with the other access facts instead of on its own
2019-12-10 11:44:44 +01:00
bors
8960acf023 Auto merge of #66277 - peter-wilkins:impl-from-wider-non-zeros, r=SimonSapin
From<NonZero*> impls for wider NonZero types

Closes: https://github.com/rust-lang/rust/issues/66291
2019-12-10 10:11:37 +00:00
Guillaume Gomez
f0babc8be4 Remove tidy comment 2019-12-10 10:42:03 +01:00
Stephane Raux
1a26df7727 Remove trailing whitespace 2019-12-10 00:05:37 -08:00
Stephane Raux
fe6ddd5d15 Specify behavior when passed a null pointer 2019-12-09 23:20:49 -08:00
Stephane Raux
ead1159490 Use Niko's wording 2019-12-09 23:20:49 -08:00
bors
883b6aacba Auto merge of #67039 - xfix:manually-implement-pin-traits, r=nikomatsakis
Use deref target in Pin trait implementations

Using deref target instead of pointer itself avoids providing access to `&Rc<T>` for malicious implementations, which would allow calling `Rc::get_mut`.

This is a breaking change necessary due to unsoundness, however the impact of it should be minimal.

This only fixes the issue with malicious `PartialEq` implementations, other `Pin` soundness issues are still here.

See <https://internals.rust-lang.org/t/unsoundness-in-pin/11311/73> for more details.
2019-12-10 06:52:45 +00:00
bors
975e83a32a Auto merge of #67184 - tmandry:rollup-mzqxtck, r=tmandry
Rollup of 11 pull requests

Successful merges:

 - #66892 (Format libcore with rustfmt (including tests and benches))
 - #67106 (resolve: Resolve visibilities on fields with non-builtin attributes)
 - #67113 (Print the visibility in `print_variant`.)
 - #67115 (Simplify `check_decl_no_pat`.)
 - #67119 (libstd miri tests: avoid warnings)
 - #67125 (Added ExactSizeIterator bound to return types)
 - #67138 (Simplify `Layout::extend_packed`)
 - #67145 (fix miri step debug printing)
 - #67149 (Do not ICE #67123)
 - #67155 (Move `Layout`s instead of binding by reference)
 - #67169 (inline some common methods on OsStr)

Failed merges:

r? @ghost
2019-12-10 02:41:00 +00:00
Tyler Mandry
c255815240
Rollup merge of #67169 - lzutao:inline_osstr, r=nagisa
inline some common methods on OsStr

Closes #67150
2019-12-09 14:33:15 -08:00
Tyler Mandry
196ca9dc94
Rollup merge of #67155 - kraai:move-instead-of-binding-to-reference, r=cramertj
Move `Layout`s instead of binding by reference
2019-12-09 14:33:13 -08:00
Tyler Mandry
c2702e38e4
Rollup merge of #67149 - JohnTitor:fix-ice-1, r=Dylan-DPC
Do not ICE #67123

Fixes #67123

r? @matthewjasper
2019-12-09 14:33:12 -08:00
Tyler Mandry
5ce5464faf
Rollup merge of #67145 - RalfJung:miri-step, r=oli-obk
fix miri step debug printing

r? @oli-obk
2019-12-09 14:33:10 -08:00
Tyler Mandry
6b6b6f3220
Rollup merge of #67138 - kraai:simplify-Layout-extend_packed, r=Amanieu
Simplify `Layout::extend_packed`
2019-12-09 14:33:09 -08:00
Tyler Mandry
28b112f2f4
Rollup merge of #67125 - hashedone:master, r=petrochenkov
Added ExactSizeIterator bound to return types

Fixes #66865
2019-12-09 14:33:08 -08:00
Tyler Mandry
e775820088
Rollup merge of #67119 - RalfJung:miri-test-libstd, r=alexcrichton
libstd miri tests: avoid warnings

Ignore tests in a way that all the code still gets compiled, to get rid of all the "unused" warnings that otherwise show up when running the test suite in Miri.
2019-12-09 14:33:06 -08:00
Tyler Mandry
a0e00f824a
Rollup merge of #67115 - Centril:simplify-check-decl-no-pat, r=davidtwco
Simplify `check_decl_no_pat`.

r? @davidtwco
2019-12-09 14:33:05 -08:00
Tyler Mandry
3340a5b48d
Rollup merge of #67113 - Centril:enum-vis-pretty-fix, r=davidtwco
Print the visibility in `print_variant`.

r? @davidtwco
cc @dtolnay for `syn` awareness.
2019-12-09 14:33:03 -08:00
Tyler Mandry
5c6941b567
Rollup merge of #67106 - petrochenkov:docerr, r=matthewjasper
resolve: Resolve visibilities on fields with non-builtin attributes

Follow-up to https://github.com/rust-lang/rust/pull/66669.

The first commit is primary (and also a backport candidate), the other ones are further cleanups.
In this case it's not strictly necessary to avoid reporting errors during speculative resolution because 1) all visibilities are resolved non-speculatively sooner or later and 2) error reporting infrastructure merges identical errors with identical spans anyway.

Fixes https://github.com/rust-lang/rust/issues/67006
r? @matthewjasper
2019-12-09 14:33:02 -08:00
Tyler Mandry
4166ce8674
Rollup merge of #66892 - dtolnay:fmt5, r=KodrAus
Format libcore with rustfmt (including tests and benches)

Important: two small non-rustfmt changes that will need close review:

- I added `#[rustfmt::skip]` to two manually arranged tables in src/libcore/benches/ascii.rs; see first commit in the PR.
- I added `// ignore-tidy-filelength` to src/libcore/ptr/mod.rs because rustfmt puts it over tidy's 3000 line limit; see second commit in the PR. I filed #66891 to follow up on breaking up that file. For now though having it be formatted is more important than having it below the line limit.

---

As with my previous formatting PRs, I am avoiding causing merge conflicts in other PRs by only touches those files that are not involved in any currently open PR. Files that appear in new PRs between when this PR is opened and when it makes it to the top of the bors queue will be reverted from this PR.

The list of files involved in open PRs is determined by querying GitHub's GraphQL API [with this script](https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8).

With the list of files from the script in outstanding_files, the relevant commands were:

```
$ find src/libcore -name '*.rs' \
    | xargs rustfmt --edition=2018 --unstable-features --skip-children
$ rg libcore outstanding_files | xargs git checkout --
```

To confirm no funny business:

```
$ git checkout $THIS_COMMIT^
$ git show --pretty= --name-only $THIS_COMMIT \
    | xargs rustfmt --edition=2018 --unstable-features --skip-children
$ git diff $THIS_COMMIT  # there should be no difference
```

r? @Dylan-DPC
2019-12-09 14:33:00 -08:00
Matthew Jasper
d96485d49e Add more tests for borrowck and dropck slice pattern handling 2019-12-09 20:43:24 +00:00
Matthew Jasper
cab7af986c Check for ConstantIndex move paths correctly in borrowck 2019-12-09 20:43:24 +00:00
Matthew Jasper
96dc03bad7 Remove uniform_array_move_out passes
These passes were buggy, MIR building is now responsible for
canonicalizing `ConstantIndex` projections and `MoveData` is responsible
for splitting `Subslice` projections.
2019-12-09 20:43:22 +00:00
Matthew Jasper
bf278ebd9d Make const index and subslice array projections more useful
* `min_length` is now exact for const index elements.
* const index elements are always from the start.
* make array `Subslice` `PlaceElems` count both `from` and `to` from the
  start.
2019-12-09 20:42:52 +00:00
Matthew Jasper
d2ed209699 Ensure that unevaluated constants of type ! are present in the MIR 2019-12-09 20:38:51 +00:00
Bartłomiej Kuras
989bf84af3 Added ExactSizeIterator bound to return types
This reverts commit d97379a96e594820b9e865ae56cb8d753bf6b06a.
2019-12-09 21:16:48 +01:00
bors
76a252ea9e Auto merge of #67110 - tmandry:bump-compiler-builtins, r=alexcrichton
Bump compiler-builtins

- https://github.com/rust-lang/compiler-builtins/pull/306
- https://github.com/rust-lang/compiler-builtins/pull/309
- https://github.com/rust-lang/compiler-builtins/pull/310
- https://github.com/rust-lang/compiler-builtins/pull/311
- https://github.com/rust-lang/compiler-builtins/pull/312
- https://github.com/rust-lang/compiler-builtins/pull/313
- https://github.com/rust-lang/compiler-builtins/pull/315
- https://github.com/rust-lang/compiler-builtins/pull/317
- https://github.com/rust-lang/compiler-builtins/pull/323
- https://github.com/rust-lang/compiler-builtins/pull/324
- https://github.com/rust-lang/compiler-builtins/pull/328

Adds support for backtraces from `__rust_probestack` plus other goodies.

r? @alexcrichton
2019-12-09 19:42:48 +00:00
Vadim Petrochenkov
5f6267c8b3 resolve: Make visibility resolution more speculative
To avoid potential duplicate diagnostics and separate the error reporting logic
2019-12-09 22:41:47 +03:00
Vadim Petrochenkov
e2c962d3d0 resolve: Cleanup some field processing code 2019-12-09 22:33:28 +03:00
Vadim Petrochenkov
9e6725dcfe resolve: Resolve visibilities on fields with non-builtin attributes 2019-12-09 22:33:23 +03:00
Christoph Schmidler
a678628e58 Update HashMap documentation hint of the used 'quadratic probing' and 'SIMD lookup' algorithms 2019-12-09 20:13:42 +01:00
Jakub Kądziołka
ecd930717b
doc: Use .copied() instead of .cloned() in Vec example 2019-12-09 19:48:18 +01:00
Christoph Schmidler
fba2808587 Merge branch 'master' of github.com:rust-lang/rust 2019-12-09 18:39:47 +01:00
Guillaume Gomez
26b0bcb47c Remove useless comment 2019-12-09 18:06:11 +01:00
Guillaume Gomez
e57338140d Move RegionTarget and RegionDeps where they into clean/auto_trait 2019-12-09 18:03:23 +01:00
Guillaume Gomez
8749550d5c Remove unused imports 2019-12-09 18:00:51 +01:00
Guillaume Gomez
bc68976472 Fix usage of variants in clean/utils 2019-12-09 17:58:46 +01:00
Guillaume Gomez
ae7e808f42 Make utils module public 2019-12-09 17:57:02 +01:00
Guillaume Gomez
596705b42f Fix missing imports 2019-12-09 17:53:42 +01:00
Guillaume Gomez
0c3067fcff Remove functions from clean/mod.rs 2019-12-09 17:46:35 +01:00
Guillaume Gomez
5d906ed971 Move clean functions to another file 2019-12-09 17:46:20 +01:00
Eric Huss
60d4e20ff0 compiletest: add aux-crate directive 2019-12-09 08:08:27 -08:00
Eric Huss
590dd7dfef Add options to --extern flag. 2019-12-09 08:08:13 -08:00
Christoph Schmidler
970470a214 Merge branch 'master' of github.com:rust-lang/rust 2019-12-09 16:50:22 +01:00
Matthew Kraai
a983e0590a Remove checked_add in Layout::repeat 2019-12-09 06:49:37 -08:00
bors
7de9402b77 Auto merge of #67096 - mark-i-m:fix-rustc-guide-2, r=ehuss
Update rustc-guide
2019-12-09 14:07:20 +00:00