Commit Graph

227815 Commits

Author SHA1 Message Date
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
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
Tom Martin
b7d6032082
Add translatable diagnostic for import resolution strings
Add translatable diagnostic for cannot be reexported error
also added for subdiagnostics

Add translatable diagnostics for resolve_glob_import errors

Add translatable diag for unable to determine import resolution

Add translatable diag for is not directly importable
2023-06-25 08:29:28 +01: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