Commit Graph

227730 Commits

Author SHA1 Message Date
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
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
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
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
Michael Goulet
e304a1f13b Revert "Structurally resolve correctly in check_pat_lit"
This reverts commit 54fb5a48b9.
2023-06-24 18:41:27 +00:00
Guillaume Gomez
4d9ba1ac2f
Rollup merge of #113003 - Nilstrieb:uh-yeah-so-about-that-deprecation-warning, r=jyn514
Fix old python deprecation check in x.py

The warning suppression variable was not checked correctly.

I tested it with python 2.7 and it worked correctly.
2023-06-24 20:26:47 +02:00
Guillaume Gomez
6b337684ed
Rollup merge of #113002 - camelid:bootstrap-settings.bak, r=jyn514
bootstrap: Backup `settings.json` to the correct filename

The old code actually replaced `.json` with `.bak` (so, `settings.bak`),
rather than appending `.bak` as claimed (`settings.json.bak`).

`Path::set_extension` can instead be used with dots:

> The new extension may contain dots and will be used in its entirety,
> but only the part after the final dot will be reflected in
> `self.extension`.

r? ``@jyn514``
2023-06-24 20:26:46 +02:00
Guillaume Gomez
9e0f427e5c
Rollup merge of #112989 - JohnTitor:issue-109141, r=compiler-errors
Add a regression test for #109141

Closes #109141
r? ``@compiler-errors``
2023-06-24 20:26:46 +02:00
Guillaume Gomez
f0907b2c57
Rollup merge of #112971 - matthiaskrgr:templ_clippy, r=Mark-Simulacrum
issue template: add clippy entry which points to the clippy repo

Try to guide people to the clippy repo.
2023-06-24 20:26:45 +02:00
Guillaume Gomez
530516f81c
Rollup merge of #112915 - preveen-stack:patch-1, r=Mark-Simulacrum
Update runtests.py : grammar correction

- Grammatically corrected the sentence
2023-06-24 20:26:45 +02:00
Guillaume Gomez
6d3d775dc6
Rollup merge of #112912 - joshtriplett:style-let-else-clarifications, r=calebcartwright
style-guide: Rewrite let-else section for clarity, without changing formatting

The section as written did not cover all cases, and left some of them
implicit. Rewrite it to systematically cover all cases. Place examples
immediately following the corresponding case.

In the process, reorder to move the simplest cases first: start with
single-line and add progressively more line breaks.

This does not change the meaning of the section at all, and in
particular does not change the defined style for let-else statements.
2023-06-24 20:26:44 +02:00
Guillaume Gomez
a1f2f23f0f
Rollup merge of #112854 - bvanjoi:fix-112674, r=Nilstrieb
fix: add cfg diagnostic for unresolved import error

Fixes #112674

An easy fix, r? `@Nilstrieb`
2023-06-24 20:26:44 +02:00
Guillaume Gomez
696d722169
Rollup merge of #112703 - aliemjay:next-solver-root-var, r=compiler-errors
[-Ztrait-solver=next, mir-typeck] instantiate hidden types in the root universe

Fixes an ICE in the test `member-constraints-in-root-universe`.

Main motivation is to make #112691 pass under the new solver.

r? ``@compiler-errors``
2023-06-24 20:26:43 +02:00
jyn
dd314f6533 give more helpful suggestions for a missing feature gate test 2023-06-24 13:05:21 -05:00
jyn
b556e28496 outline x.py alternate invocations to the dev guide
almost no one on windows builds from source unless they're contributing,
and `./x.py` just works on most unix systems.
2023-06-24 13:05:21 -05:00
Nilstrieb
f799e78d77 Fix old python deprecation check in x.py
The warning suppression variable was not checked correctly.
2023-06-24 19:45:42 +02:00
Noah Lev
ce326918ec bootstrap: Backup settings.json to the correct filename
The old code actually replaced `.json` with `.bak` (so, `settings.bak`),
rather than appending `.bak` as claimed (`settings.json.bak`).

`Path::set_extension` can instead be used with dots:

> The new extension may contain dots and will be used in its entirety,
> but only the part after the final dot will be reflected in
> self.extension.
2023-06-24 10:23:46 -07:00
Chris Denton
8a7399cd45
Move arm32 shim to c.rs 2023-06-24 17:30:27 +01:00
bors
69a63737fa Auto merge of #112996 - GuillaumeGomez:migrate-gui-test-color-16, 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-24 14:23:50 +00:00
bohan
8c8c7ef78a fix: add cfg diagnostic for unresolved import error 2023-06-24 21:45:17 +08:00
Ali MJ Al-Nasrawy
a72013f7f0 instantiate hidden types in root universe 2023-06-24 13:00:15 +00:00