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 5 pull requests #96363

Merged
merged 14 commits into from
Apr 24, 2022
Merged

Rollup of 5 pull requests #96363

merged 14 commits into from
Apr 24, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jyn514 and others added 14 commits March 30, 2022 18:31
While working on rust-lang#95503,
I realized that this will interfere with existing command lines:
Currently people run `x build library/std` expecting it to be added to the sysroot,
but after that change, it will *only* build `libstd` without making it available
for the toolchain.

It's debatable whether that's a breaking change that will be accepted; if so, this PR is absolutely
necessary to make sure there's a command for "build the standard library and add it to the sysroot".
Even if not, though, I think `x build library` is more clear about what actually happens than the
current `x build library/std`.

For consistency, also add support for `compiler` and all other command variants.  Note that `doc
compiler` was already supported, so in a sense this is just fixing an existing inconsistency.

I plan to change the dev-guide and various instructions in the README to `build library` once this is merged.
Since these arguments are now always the same, combine them into a
singular `--python` argument.
This doesn't cause any tests to fail, and can greatly speed them up.
I didn't know that the `test::` syntax was valid before, and it doesn't
seem to be documented anywhere. Add a test so it doesn't regress accidentally,
and as executable documentation.
This is not super important to do, but the consistency is nice.

I didn't change any tests that call `configure("dist")` and then override the subcommand - doing
that at all is pretty sketchy, but I don't want to mess with it while already doing a refactor.
…ions under NLL

Because NLL borrowck is run after typeck, `in_progress_typeck_results`
was always `None` which was preventing the retrieval of the span to which
the suggestion is suppose to add the lifetime bound.

We now manually pass the `LocalDefId` owner to `construct_generic_bound_failure`
so that under NLL, we give the owner id of the current body.
…-issue-90315, r=Mark-Simulacrum

diagnostics: regression test for `<usize as Iterator>::rev`

Closes rust-lang#90315
…crum

Add `x {check,build,doc} {compiler,library}` aliases.

While working on rust-lang#95503, I realized that it will interfere with existing command lines:
Currently people run `x build library/std` expecting it to "add all library crates to the sysroot",
but after that change, it will *only* build `libstd` and its dependencies (and add them to the sysroot), not libtest or libproc_macro.

That will work for local testing in most cases, but could be confusing. Even if not, though, I think `x build library` is more clear about what actually happens than the current `x build library/std`.

The intended end goal is something like:
- For check/build/doc, we have library + compiler aliases, which correspond to basically "most possible" for that piece. This is the intended path of entry (rather than library/test or similar as today) for when you just want the thing to work -- for example, getting a compiler that is "crates.io-compatible" would be roughly `x.py build library`). rust-lang#95504
- Specific crate invocations build up to that crate, which means that if you don't care about tests you probably want x.py build library/proc_macro or library/std for faster build times. rust-lang#95503

Note that this is already implemented today for the `doc` command and seems to work pretty well in practice.

I plan to change the dev-guide and various instructions in the README to `build library` once this is merged.

`@rustbot` label +A-rustbuild
…rk-Simulacrum

compiletest: combine `--*-python` args

Since these arguments are now always the same, combine them into a
singular `--python` argument.

Fixes rust-lang#96011
…Mark-Simulacrum

Improve bootstrap tests

- Don't checkout submodules in bootstrap tests

  This doesn't cause any tests to fail, and can greatly speed them up.

- Add a test for --exclude test::XXX

  I didn't know that the `test::` syntax was valid before, and it doesn't seem to be documented anywhere. Add a test so it doesn't regress accidentally, and as executable documentation.
  This also moves the `exclude` tests out of `dist`, to avoid assertion errors when the `cmd` passed to configure didn't match the `subcommand` used.

- Use run_build helper consistently across most bootstrap tests
  This is not super important to do, but the consistency is nice.

  I didn't change any tests that call `configure("dist")` and then override the subcommand - doing
that at all is pretty sketchy, but I don't want to mess with it while already doing a refactor.

Found while working on the "one call to Step for all paths" change mentioned in rust-lang#95503 (comment), but independent of that work.

cc `@pietroalbini` for the `--exclude` test, git blame says you added support for it originally.
…suggestions, r=jackh726

Improve span for `consider adding an explicit lifetime bound` suggestions under NLL

Because NLL borrowck is run after typeck, `in_progress_typeck_results` was always `None` which was preventing the retrieval of the span to which the suggestion is suppose to add the lifetime bound.
We now manually pass the `LocalDefId` owner to `construct_generic_bound_failure` so that under NLL, we give the owner id of the current body.

This helps with rust-lang#96332
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Apr 24, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 24, 2022

📌 Commit aef9eb5 has been approved by matthiaskrgr

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 24, 2022
@bors
Copy link
Contributor

bors commented Apr 24, 2022

⌛ Testing commit aef9eb5 with merge 5cdab3a...

@bors
Copy link
Contributor

bors commented Apr 24, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 5cdab3a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 24, 2022
@bors bors merged commit 5cdab3a into rust-lang:master Apr 24, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 24, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5cdab3a): comparison url.

Summary: This benchmark run did not return any relevant results.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@matthiaskrgr matthiaskrgr deleted the rollup-mthdja5 branch July 30, 2022 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants