Commit Graph

227756 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Guillaume Gomez
0979bf7413 Migrate GUI colors test to original CSS color format 2023-06-25 10:49:28 +02:00
Guillaume Gomez
a3c147b90b
Rollup merge of #113018 - asquared31415:test_fix, r=TaKO8Ki
Fix test for #96258

#98644 did not properly test enabling the problematic lint as a warning due to improper use of `compile-flags:` (missing `:`). This makes it use `#![warn]` instead, like in the reproducer.

cc #96258
2023-06-25 10:46:16 +02:00
Guillaume Gomez
758adf64e7
Rollup merge of #113011 - Nilstrieb:can_access_statics, r=oli-obk
Add enum for `can_access_statics` boolean

`/*can_access_statics:*/ false` is one of the ways to do this, but not the one I like.

r? oli-obk
2023-06-25 10:46:15 +02:00
Guillaume Gomez
691580f566
Rollup merge of #112990 - JohnTitor:issue-96699, r=TaKO8Ki
Add a regression test for #96699

Closes #96699
r? `@BoxyUwU`
2023-06-25 10:46:15 +02:00
Guillaume Gomez
fb98925b8c
Rollup merge of #112918 - zephaniahong:issue-107077-fix, r=Mark-Simulacrum
display PID of process holding lock

Displays PID of process holding lock when trying to run multiple instances of x.py
2023-06-25 10:46:14 +02:00
bors
3c5d71a99d Auto merge of #112476 - chenyukang:yukang-fix-109991, r=compiler-errors
Do not emit coerce_suggestions for expr from destructuring assignment desugaring

Fixes #109991
2023-06-25 04:45:52 +00:00
bors
7b9b127700 Auto merge of #113014 - matthiaskrgr:rollup-dasfmfc, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #112937 (rustdoc: Align search results horizontally for easy scanning)
 - #112950 (DirEntry::file_name: improve explanation)
 - #112956 (Expose `compiler-builtins-weak-intrinsics` feature for `-Zbuild-std`)
 - #113008 (Move some docs from the README to the dev-guide)
 - #113009 (Remove unnecessary `path` attribute)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-25 02:08:04 +00:00
asquared31415
9dd655ff91 fix test 2023-06-24 21:49:38 -04:00
yukang
33f73c2e93 Do not offer any of the suggestions in emit_coerce_suggestions for expr from destructuring assignment desugaring 2023-06-25 09:26:17 +08:00
Matthias Krüger
48247884c9
Rollup merge of #113009 - ChrisDenton:remove-path, r=workingjubilee
Remove unnecessary `path` attribute

Follow up to #111401. I missed this at the time but it should now be totally unnecessary since the other include was removed.

r? `@workingjubilee`
2023-06-25 02:04:21 +02:00
Matthias Krüger
85a7bb47e4
Rollup merge of #113008 - jyn514:new-contributor-improvements, r=clubby789
Move some docs from the README to the dev-guide

and as a drive-by cleanup, improve the error message for `x test tidy` when a feature gate is missing.

This also improves the error message you get on Windows if python isn't installed.

cc https://github.com/rust-lang/libs-team/issues/242#issuecomment-1597558557, https://github.com/rust-lang/rustc-dev-guide/pull/1701
2023-06-25 02:04:21 +02:00
Matthias Krüger
2ed4368d2f
Rollup merge of #112956 - Amanieu:weak-intrinsics, r=Mark-Simulacrum
Expose `compiler-builtins-weak-intrinsics` feature for `-Zbuild-std`

This was added in rust-lang/compiler-builtins#526 to force all compiler-builtins intrinsics to use weak linkage.
2023-06-25 02:04:20 +02:00
Matthias Krüger
8630b1b3f4
Rollup merge of #112950 - tshepang:patch-4, r=Mark-Simulacrum
DirEntry::file_name: improve explanation
2023-06-25 02:04:20 +02:00
Matthias Krüger
8816f9ee1e
Rollup merge of #112937 - camelid:align-typenames, r=notriddle,GuillaumeGomez
rustdoc: Align search results horizontally for easy scanning

The recent PR #110688 added info about an item's kind before its name in
search results. However, because the kind and name are inline with no
alignment, it's now hard to visually scan downward through the search
results, looking at item names. This PR fixes that by horizontally
aligning search results such that there are now two columns of
information.

r? `@GuillaumeGomez`
2023-06-25 02:04:20 +02:00
León Orell Valerian Liehr
d23c334707
rustdoc: get rid of extra line when line-wrapping fn decls with empty arg list 2023-06-24 23:39:35 +02:00
Noah Lev
9b97ae1d8c rustdoc: Update GUI test 2023-06-24 14:30:35 -07:00
bors
f7ca9df695 Auto merge of #113006 - GuillaumeGomez:rollup-l2js0wa, r=GuillaumeGomez
Rollup of 8 pull requests

Successful merges:

 - #112703 ([-Ztrait-solver=next, mir-typeck] instantiate hidden types in the root universe)
 - #112854 (fix: add cfg diagnostic for unresolved import error)
 - #112912 (style-guide: Rewrite let-else section for clarity, without changing formatting)
 - #112915 (Update runtests.py : grammar correction)
 - #112971 (issue template: add clippy entry which points to the clippy repo)
 - #112989 (Add a regression test for #109141)
 - #113002 (bootstrap: Backup `settings.json` to the correct filename)
 - #113003 (Fix old python deprecation check in x.py)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-24 21:04:15 +00:00
Nilstrieb
70b6a74c3c Add enum for can_access_statics boolean
`/*can_access_statics:*/ false` is one of the ways to do this, but not
the one I like.
2023-06-24 20:40:40 +00:00
jyn
664ffa419e Don't print "x.ps1"
This is left over from adding `Get-Command -syntax`; it's not helpful.
2023-06-24 14:44:53 -05:00
jyn
fa7e965bf0 Give a better error on Windows if python isn't installed
Before:

```
PS C:\Users\vboxuser\rust> ./x
x.ps1

PS C:\Users\vboxuser\rust>
```

After:
```
PS C:\Users\vboxuser\rust> ./x
x.ps1

C:\Users\vboxuser\rust\x.ps1 : C:\Users\vboxuser\rust\x.ps1: error: did not find python installed
help: consider installing it from https://www.python.org/downloads/windows/
At line:1 char:1
+ ./x
+ ~~~
    + CategoryInfo          : NotInstalled: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,x.ps1
```

The existing message from the shell script is already decent and I decided not to change it:
```
$ ./x
Python was not found but can be installed from the Microsoft Store: ms-windows-store://pdp/?productid=9NJ46SX7X90P
```
2023-06-24 14:44:53 -05:00
Chris Denton
e2eff0d4ab
Remove unnecessary path attribute 2023-06-24 19:56:29 +01:00