Commit Graph

227921 Commits

Author SHA1 Message Date
Guillaume Gomez
32f056ce6b Add/improve code comments 2023-06-26 16:38:14 +02:00
Takayuki Maeda
40e3fcfd59
Rollup merge of #112920 - fmease:rustdoc-fix-112904, r=GuillaumeGomez
rustdoc: render generic params & where-clauses of cross-crate assoc tys in impls

We used to only ever render generic parameters & where-clauses of cross-crate associated types when the item was located inside of a trait and we used to just drop them when it was inside of an impl block (trait or inherent).

Fixes #112904.

`@rustbot` label A-cross-crate-reexports
2023-06-26 23:16:16 +09:00
Takayuki Maeda
c6a4d44977
Rollup merge of #112677 - the8472:remove-unusued-field, r=JohnTitor
remove unused field

Followup to #104455. The field is no longer needed since ExtractIf (previously DrainFilter) doesn't keep draining in its drop impl.
2023-06-26 23:16:16 +09:00
bors
6f8c27ae89 Auto merge of #112887 - WaffleLapkin:become_unuwuable_in_hir, r=compiler-errors,Nilstrieb
`hir`: Add `Become` expression kind (explicit tail calls experiment)

This adds `hir::ExprKind::Become` alongside ast lowering. During hir-thir lowering we currently lower `become` as `return`, so that we can partially test `become` without ICEing.

cc `@scottmcm`
r? `@Nilstrieb`
2023-06-26 13:51:04 +00:00
bors
27e10c5292 Auto merge of #113049 - matthiaskrgr:rollup-41wo5w8, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #111326 (Add support for NetBSD/aarch64-be (big-endian arm64).)
 - #112559 (Add esp-idf missing targets)
 - #112840 (doc: loongarch: Update maintainers)
 - #112955 (CI: cancel in-progress workflow runs after a push)
 - #112979 (Rewrite most diagnostics as translatable within resolve/imports)
 - #113034 (Switch some more Steps to `builder.msg`)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-26 10:15:16 +00:00
Matthias Krüger
5122e88b35
Rollup merge of #113034 - jyn514:ci-progress, r=oli-obk
Switch some more Steps to `builder.msg`

In particular, this hides compiletest suites under a dropdown - some builders are configured with `verbose-tests`, which makes the suites take up many thousands of lines.

before:
```
Documenting stage1 cargo (x86_64-unknown-linux-gnu)
Check compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
```

after:
```
::group::Documenting stage1 cargo (x86_64-unknown-linux-gnu)
::group::Testing stage1 compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu)
```

found this from https://github.com/rust-lang-ci/rust/actions/runs/5366993848/jobs/9736792611

r? `@oli-obk`
2023-06-26 11:58:46 +02:00
Matthias Krüger
005d860fc6
Rollup merge of #112979 - NotStirred:translatable_diag/resolve_imports, r=fee1-dead
Rewrite most diagnostics as translatable within resolve/imports
2023-06-26 11:58:45 +02:00
Matthias Krüger
5d9935a638
Rollup merge of #112955 - Kobzol:ci-pr-cancel-workflows, r=Mark-Simulacrum
CI: cancel in-progress workflow runs after a push

Experimenting with the `concurrency` attribute.

r? `@Mark-Simulacrum`
2023-06-26 11:58:45 +02:00
Matthias Krüger
de79f51206
Rollup merge of #112840 - loongarch-rs:update-docs, r=GuillaumeGomez
doc: loongarch: Update maintainers

My colleague, `@zhaixiaojuan,` has been completely occupied with other matters and is no longer in charge of Rust. Consequently, I intend to update the maintainers in the platform documentation to avoid causing any disruptions for her and to ensure that relevant notifications regarding LoongArch are promptly directed to the appropriate developers.

Thanks your for contributions!
2023-06-26 11:58:44 +02:00
Matthias Krüger
ac84b664f9
Rollup merge of #112559 - SergioGasquez:master, r=JohnTitor
Add esp-idf missing targets

Adds some esp-idf missing targets to the table
2023-06-26 11:58:44 +02:00
Matthias Krüger
f6d58eaad3
Rollup merge of #111326 - he32:netbsd-aarch64-be, r=oli-obk
Add support for NetBSD/aarch64-be (big-endian arm64).
2023-06-26 11:58:43 +02:00
Oli Scherer
042f6052ab Add some tests around where bounds on associated items and their lack of effect on impls 2023-06-26 09:56:28 +00:00
Maybe Waffle
e38576a893 Support hir::ExprKind::Become in clippy 2023-06-26 08:56:32 +00:00
Maybe Waffle
ccb71ff424 hir: Add Become expression kind 2023-06-26 08:56:32 +00:00
bors
25b5af1b3a Auto merge of #113024 - Jerrody:master, r=thomcc
`Default`: Always inline primitive data types.
2023-06-26 06:45:04 +00:00
bors
06c58cb966 Auto merge of #112884 - klensy:ri-drop-old-clap, r=albertlarsan68
rust-installer: migrate to clap 4.2, change to 2021 edition and fix few clippy lints

Updated rust-installer to clap 4.2, dropping last user of clap v3; changes to 2021 edition, fixes few clippy warns.
2023-06-26 03:21:01 +00:00
Eric Mark Martin
c07c10d1e4 use PlaceRef abstractions more consistently 2023-06-25 20:38:01 -04:00
bors
ae8ffa663c Auto merge of #111850 - the8472:external-step-by, r=scottmcm
Specialize `StepBy<Range<{integer}>>`

OLD

    iter::bench_range_step_by_fold_u16      700.00ns/iter +/- 10.00ns
    iter::bench_range_step_by_fold_usize    519.00ns/iter  +/- 6.00ns
    iter::bench_range_step_by_loop_u32      555.00ns/iter  +/- 7.00ns
    iter::bench_range_step_by_sum_reducible  37.00ns/iter  +/- 0.00ns

NEW

    iter::bench_range_step_by_fold_u16       49.00ns/iter +/- 0.00ns
    iter::bench_range_step_by_fold_usize    194.00ns/iter +/- 1.00ns
    iter::bench_range_step_by_loop_u32       98.00ns/iter +/- 0.00ns
    iter::bench_range_step_by_sum_reducible   1.00ns/iter +/- 0.00ns

NEW + `-Ctarget-cpu=x86-64-v3`

    iter::bench_range_step_by_fold_u16      22.00ns/iter +/- 0.00ns
    iter::bench_range_step_by_fold_usize    80.00ns/iter +/- 1.00ns
    iter::bench_range_step_by_loop_u32      41.00ns/iter +/- 0.00ns
    iter::bench_range_step_by_sum_reducible  1.00ns/iter +/- 0.00ns

I have only optimized for walltime of those methods, I haven't tested whether it eliminates bounds checks when indexing into slices via things like `(0..slice.len()).step_by(16)`.
2023-06-26 00:28:30 +00:00
Nicholas Nethercote
666b1b68a7 Tweak thread names for CGU processing.
For non-incremental builds on Unix, currently all the thread names look
like `opt regex.f10ba03eb5ec7975-cgu.0`. But they are truncated by
`pthread_setname` to `opt regex.f10ba`, hiding the numeric suffix that
distinguishes them. This is really annoying when using a profiler like
Samply.

This commit changes these thread names to a form like `opt cgu.0`, which
is much better.
2023-06-26 09:14:45 +10:00
Nicholas Nethercote
487bdeb519 Improve ordering and naming of CGUs for non-incremental builds.
Currently there are two problems.

First, the CGUS don't end up in size order. The merging loop does sort
by size on each iteration, but we don't sort after the final merge, so
typically there is one CGU out of place. (And sometimes we don't enter
the merging loop at all, in which case they end up in random order.)

Second, we then assign names that differ only by a numeric suffix, and
then we sort them lexicographically by name, giving us an order like
this:

regex.f10ba03eb5ec7975-cgu.1
regex.f10ba03eb5ec7975-cgu.10
regex.f10ba03eb5ec7975-cgu.11
regex.f10ba03eb5ec7975-cgu.12
regex.f10ba03eb5ec7975-cgu.13
regex.f10ba03eb5ec7975-cgu.14
regex.f10ba03eb5ec7975-cgu.15
regex.f10ba03eb5ec7975-cgu.2
regex.f10ba03eb5ec7975-cgu.3
regex.f10ba03eb5ec7975-cgu.4
regex.f10ba03eb5ec7975-cgu.5
regex.f10ba03eb5ec7975-cgu.6
regex.f10ba03eb5ec7975-cgu.7
regex.f10ba03eb5ec7975-cgu.8
regex.f10ba03eb5ec7975-cgu.9

These two problems are really annoying when debugging and profiling the
CGUs.

This commit ensures CGUs are sorted by name *and* reverse sorted by
size. This involves (a) one extra sort by size operation, and (b)
padding the numeric indices with zeroes, e.g.
`regex.f10ba03eb5ec7975-cgu.01`.

(Note that none of this applies for incremental builds, where a
different hash-based CGU naming scheme is used.)
2023-06-26 09:14:11 +10:00
bors
7f01f03061 Auto merge of #113038 - matthiaskrgr:rollup-sdcfkxa, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #112976 (Add test for futures with HRTB)
 - #113013 (rustdoc: get rid of extra line when line-wrapping fn decls with empty arg list)
 - #113030 (Add a regression test for #109071)
 - #113031 (Add a regression test for #110933)
 - #113036 (Accept `ReStatic` for RPITIT)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-25 22:01:21 +00:00
Matthias Krüger
6c7575721f
Rollup merge of #113036 - TaKO8Ki:fix-112094, r=compiler-errors
Accept `ReStatic` for RPITIT

Fixes #112094

Regression in 8216b7f229

If there is a better suggestion, I will go with that.
2023-06-25 22:34:32 +02:00
Matthias Krüger
d7723f4180
Rollup merge of #113031 - JohnTitor:issue-110933, r=compiler-errors
Add a regression test for #110933

Closes #110933
r? `@compiler-errors`
2023-06-25 22:34:31 +02:00
Matthias Krüger
dfd6d708db
Rollup merge of #113030 - JohnTitor:issue-109071, r=TaKO8Ki
Add a regression test for #109071

Closes #109071
r? `@compiler-errors`
2023-06-25 22:34:31 +02:00
Matthias Krüger
32995d87e6
Rollup merge of #113013 - fmease:rustdoc-decl-line-wrapping-slim-arg-list, r=camelid
rustdoc: get rid of extra line when line-wrapping fn decls with empty arg list

Fixes https://github.com/bevyengine/bevy/issues/8898#issuecomment-1605683417:

![Screenshot 2023-06-24 at 23-42-53 any_with_component in bevy_ecs schedule common_conditions - Rust](https://github.com/rust-lang/rust/assets/14913065/4646eba6-b186-4d78-96d9-aad716a4ef5d)

It now prints as shown below (which conforms to the style guide):

```rs
pub fn any_with_component<T: Component>(
) -> impl FnMut(Query<'_, '_, (), With<T>>) -> bool + Clone
```

The bug was introduced in #109011.
2023-06-25 22:34:30 +02:00
Matthias Krüger
aa8a885cc1
Rollup merge of #112976 - dswij:issue-112347, r=compiler-errors
Add test for futures with HRTB

Part of #112347

This PR adds test for ice when resolving for `Futures` with HRTB.
2023-06-25 22:34:30 +02:00
bors
8084f397c6 Auto merge of #113037 - TaKO8Ki:rollup-pqfbxwk, r=TaKO8Ki
Rollup of 3 pull requests

Successful merges:

 - #112281 (Test the cargo args generated by bootstrap.py)
 - #113028 (rustdoc: handle assoc const equalities in cross-crate impl-Trait-in-arg-pos)
 - #113029 (CI: do not run Bump dependencies workflow on forks)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-25 18:26:41 +00:00
Havard Eidnes
abb43958a9 platform-support.md: remove references to not-yet upstreamed targets. 2023-06-25 18:23:33 +00:00
Takayuki Maeda
f948ce7362
Rollup merge of #113029 - Kobzol:ci-fork-update, r=Mark-Simulacrum
CI: do not run Bump dependencies workflow on forks

I haven't found a prettier way of doing this. We can possibly only use the condition on the `pr` job (to just disallow the creation of the PR), or only on the `not-waiting-on-bors` step, as if it doesn't run, the following job (probably) also shouldn't run.

Fixes: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/.22Weekly.20cargo.20update.22.20on.20forks

r? `@Mark-Simulacrum`
2023-06-26 01:50:28 +09:00
Takayuki Maeda
019f43e6c2
Rollup merge of #113028 - fmease:rustdoc-x-crate-itiap-clean-term, r=notriddle
rustdoc: handle assoc const equalities in cross-crate impl-Trait-in-arg-pos

Fixes FIXME (the added test previously lead to an ICE).

`@rustbot` label A-cross-crate-reexports
2023-06-26 01:50:28 +09:00
Takayuki Maeda
96ab7e6ed7
Rollup merge of #112281 - jyn514:test-bootstrap-py, r=albertlarsan68
Test the cargo args generated by bootstrap.py

I recommend reviewing this commit-by-commit using the instructions in https://rustc-dev-guide.rust-lang.org/git.html#moving-large-sections-of-code.

- Test cargo arguments passed by bootstrap.py

  This moves a lot of code around, but the logic itself is not too terribly complicated.

    - Move almost all logic in `def bootstrap` to the `RustBuild` class, to avoid mixing setting configuration with running commands
    - Update various doctests to the new (more complete) RustBuild config. In particular, don't pretend that `bin_root` supports `build` being unset.
    - Change `parse_args` not to use a global, to allow testing it
    - Set BUILD_DIR appropriately so bootstrap.py doesn't panic because cargo isn't found

- Allow passing arguments to `bootstrap_test.py`

    Previous, it used the built-in test runner, which doesn't support options unless they're manually passed in the script.

- Fix progress messages for configure in bootstrap_test.py

    Before it would unconditionally print `configure-args = []`.

r? `@albertlarsan68` cc https://github.com/rust-lang/rust/pull/112089 https://github.com/rust-lang/rust/pull/111979#issuecomment-1568525699
2023-06-26 01:50:27 +09:00
Havard Eidnes
7a07ffdbd8 SUMMARY.md: add entry for NetBSD. 2023-06-25 16:18:08 +00:00
The 8472
f174547124 Mark the StepBy specialization as unsafe 2023-06-25 18:11:51 +02:00
The 8472
8a72f35234 StepBy<Range<{int <= usize}>> can be TrustedLen 2023-06-25 18:11:51 +02:00
Takayuki Maeda
83722c62b0 accept ReStatic for RPITIT
add an ui test for #112094
2023-06-26 01:11:44 +09:00
The 8472
f70a4b9dd3 doccomments for StepBy specializations 2023-06-25 18:02:11 +02:00
jyn
1e7f03718b fix some bugs
- fix tests when `--build` is set
- don't leak `config.example.toml` fd
- don't crash if `config.toml` doesn't exist yet
2023-06-25 10:01:04 -05:00
jyn
bd36f636cb Switch some more Steps to builder.msg
In particular, this hides compiletest suites under a dropdown - some builders are configured with `verbose-tests`, which makes the suites take up many thousands of lines.

before:
```
Documenting stage1 cargo (x86_64-unknown-linux-gnu)
Check compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
```

after:
```
::group::Documenting stage1 cargo (x86_64-unknown-linux-gnu)
::group::Testing stage1 compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu)
```
2023-06-25 09:40:30 -05:00
bors
db3c3942ea Auto merge of #113027 - matthiaskrgr:rollup-mpes684, r=matthiaskrgr
Rollup of 2 pull requests

Successful merges:

 - #113007 (Revert "Structurally resolve correctly in check_pat_lit")
 - #113023 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-25 14:08:04 +00:00
Yuki Okushi
421105b453
Add a regression test for #110933
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-25 23:03:22 +09:00
Yuki Okushi
abe52cdcc7
Add a regression test for #109071
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-25 23:01:06 +09:00
Jakub Beránek
e8973eac12
Remove cancel-outdated action 2023-06-25 16:01:01 +02:00
Jakub Beránek
cb06c973c7
CI: do not run Bump dependencies workflow on forks 2023-06-25 15:55:27 +02:00
León Orell Valerian Liehr
247aa06f10
rustdoc: handle assoc const equalities in cross-crate impl-Trait-in-arg-pos 2023-06-25 15:42:32 +02:00
dswij
91351ef486 Add test for futures with HRTB 2023-06-25 21:32:02 +08:00
Matthias Krüger
d2f82a00d0
Rollup merge of #113023 - GuillaumeGomez:migrate-gui-test-color-17, r=notriddle
Migrate GUI colors test to original CSS color format

Follow-up of https://github.com/rust-lang/rust/pull/111459.

r? `@notriddle`
2023-06-25 13:48:37 +02:00
Matthias Krüger
75f6a7aa00
Rollup merge of #113007 - compiler-errors:dont-structural-resolve-byte-str-pat, r=oli-obk
Revert "Structurally resolve correctly in check_pat_lit"

This reverts commit 54fb5a48b9. Also adds a couple of tests, and downgrades the existing `-Ztrait-solver=next` test to a known-bug.

Fixes #112993
2023-06-25 13:48:36 +02:00
bors
c51fbb3dd3 Auto merge of #113001 - ChrisDenton:win-arm32-shim, r=thomcc
Move windows-sys arm32 shim to c.rs

This moves the arm32 shim in to c.rs instead of appending to the generated file itself.

This makes it simpler to change these workarounds if/when needed. The downside is we need to exclude a couple of functions from being generated (see the comment). A metadata solution could help here but they'll be easy enough to add back if that happens.
2023-06-25 11:27:19 +00:00
George
bb33730361
Always inline primitive data types. 2023-06-25 12:36:21 +03:00
bors
0d03812e24 Auto merge of #113022 - GuillaumeGomez:rollup-vkpzsuw, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #112918 (display PID of process holding lock)
 - #112990 (Add a regression test for #96699)
 - #113011 (Add enum for `can_access_statics` boolean)
 - #113018 (Fix test for #96258)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-25 08:51:49 +00:00