Commit Graph

227716 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Guillaume Gomez
fa1f16116e Migrate GUI colors test to original CSS color format 2023-06-24 14:47:16 +02:00
bors
ed1ce580ec Auto merge of #112802 - lukas-code:fancy-bool, r=Nilstrieb
use ErrorGuaranteed instead of booleans in rustc_builtin_macros

implements https://github.com/rust-lang/rust/pull/112366#discussion_r1233821873

No functional changes.

Best reviewed with whitespace diff disabled.

r? `@Nilstrieb`
2023-06-24 11:43:41 +00:00
Yuki Okushi
ab87f72a22
Add a regression test for #96699
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-24 14:46:02 +09:00
Yuki Okushi
13cc8dd580
Add a regression test for #109141
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-24 14:27:58 +09:00
bors
e0ba2d038d Auto merge of #112987 - compiler-errors:rollup-6anskq1, r=compiler-errors
Rollup of 8 pull requests

Successful merges:

 - #111087 (Implement `Sync` for `mpsc::Sender`)
 - #112763 (Bump compiler_builtins)
 - #112963 (Stop bubbling out hidden types from the eval obligation queries)
 - #112965 (Don't emit same goal as input during `wf::unnormalized_obligations`)
 - #112973 (Make sure to include default en-US ftl resources for `rustc_error` crate)
 - #112981 (Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-ty)
 - #112983 (Fix return type notation associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-ty)
 - #112986 (Update cargo)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-24 03:36:19 +00:00
Michael Goulet
d28f0375c2
Rollup merge of #112986 - weihanglo:update-cargo, r=weihanglo
Update cargo

8 commits in 4cebd130ebca3bc219180a54f3e26cc1b14a91de..03bc66b55c290324bd46eb22e369c8fae1908f91
2023-06-21 18:59:29 +0000 to 2023-06-23 23:27:46 +0000
- fix(script): Be quiet on programmatic output (rust-lang/cargo#12305)
- docs(unstable): Update script documentation (rust-lang/cargo#12308)
- cargo script example needs nightly -Zscript feature (rust-lang/cargo#12287)
- fix(script): Process config relative to script, not CWD (rust-lang/cargo#12303)
- -Znext-lockfile-bump: Don't suggest using -Z on stable (rust-lang/cargo#12302)
- build(deps): bump openssl from 0.10.54 to 0.10.55 (rust-lang/cargo#12300)
- Add `.toml` file extension restriction for `-Zconfig-include` (rust-lang/cargo#12298)
- docs(unstable): Point stable-unstable docs to nightly docs (rust-lang/cargo#12299)

r? `@ghost`
2023-06-23 19:47:22 -07:00
Michael Goulet
bfe6e5c418
Rollup merge of #112983 - spastorino:new-rpitit-23, r=compiler-errors
Fix return type notation associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-ty

This avoid suggesting the associated types generated for RPITITs when the one the code refers to doesn't exist and rustc looks for a suggestion.

r? `@compiler-errors`
2023-06-23 19:47:22 -07:00
Michael Goulet
4a175523b1
Rollup merge of #112981 - spastorino:new-rpitit-22, r=compiler-errors
Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-ty

This just adjust the way we check for RPITITs and uses the new helper method to do the "old" and "new" check at once.

r? `@compiler-errors`
2023-06-23 19:47:21 -07:00
Michael Goulet
3148bcf0a9
Rollup merge of #112973 - compiler-errors:oops-forgot-ftl, r=jyn514
Make sure to include default en-US ftl resources for `rustc_error` crate

Fixes #112928
2023-06-23 19:47:21 -07:00
Michael Goulet
766db8161b
Rollup merge of #112965 - compiler-errors:circular-wf, r=aliemjay
Don't emit same goal as input during `wf::unnormalized_obligations`

r? `@aliemjay` cc `@lcnr`

I accidentally pruned the logic to handle `WF(?0)` when writing `wf::unnormalized_obligations`.

idk if you wanted to construct a test first, but this is an obvious fix. Copied the comment from above.

Fixes rust-lang/trait-system-refactor-initiative#36
2023-06-23 19:47:21 -07:00
Michael Goulet
fdce450eb5
Rollup merge of #112963 - oli-obk:tait_solver_decoupling, r=compiler-errors
Stop bubbling out hidden types from the eval obligation queries

r? `@compiler-errors`

I don't know why these were added, but they are not needed anymore. The relevant test is unaffected and I didn't see anything interesting in logging that would have justified it.

This PR has no effect on the new solver behaviour of cf2dff2b1e/tests/ui/impl-trait/issue-99642.rs (which is overflow) and cf2dff2b1e/tests/ui/impl-trait/issue-99642-2.rs (which is "unstable certainty ICE")
2023-06-23 19:47:20 -07:00
Michael Goulet
ee8b035fab
Rollup merge of #112763 - Patryk27:bump-compiler-builtins, r=Amanieu
Bump compiler_builtins

Actually closes https://github.com/rust-lang/rust/issues/108489.

Note that the example code given [in compiler_builtins](https://github.com/rust-lang/compiler-builtins/pull/527) doesn't compile on current rustc since we're still waiting for https://reviews.llvm.org/D153197 (aka `LLVM ERROR: Expected a constant shift amount!`), but it's a step forward anyway.
2023-06-23 19:47:20 -07:00
Michael Goulet
4a01a38466
Rollup merge of #111087 - ibraheemdev:patch-15, r=dtolnay
Implement `Sync` for `mpsc::Sender`

`mpsc::Sender` is currently `!Sync` because the previous implementation contained an optimization where the channel started out as single-producer and was dynamically upgraded on the first clone, which relied on a unique reference to the sender. This optimization is one of the main reasons the old implementation was so complex and was removed in #93563. `mpsc::Sender` can now soundly implement `Sync`.

Note for any potential confusion, this chance does *not* add MPMC behavior. This only affects the already `Send + Clone` *sender*, not *receiver*.

It's technically possible to rely on the `!Sync` behavior in the same way as a `PhantomData<*mut T>`, but that seems very unlikely in practice. Either way, this change is insta-stable and needs an FCP.

`@rustbot` label +T-libs-api -T-libs
2023-06-23 19:47:19 -07:00
Weihang Lo
4246e5079e
Update cargo 2023-06-24 01:38:42 +01:00