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.
- "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
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
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.
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.
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
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
These passes were buggy, MIR building is now responsible for
canonicalizing `ConstantIndex` projections and `MoveData` is responsible
for splitting `Subslice` projections.
* `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.