Commit Graph

2442 Commits

Author SHA1 Message Date
Matthias Krüger 2b37fbe050
Rollup merge of #135926 - jieyouxu:needs-subprocess-thread, r=oli-obk
Implement `needs-subprocess` directive, and cleanup a bunch of tests to use `needs-{subprocess,threads}`

### Summary

Closes #128295.

- Implements `//@ needs-subprocess` directive in compiletest as requested in #128295. However, compiletest is a host tool, so we can't just try to spawn process because that spawns the process on *host*, not the *target*, under cross-compilation scenarios.
    - The short-term solution is to add *Yet Another* list of allow-list targets.
    - The long-term solution is to first check if a `$target` supports std, then try to run a binary to do run-time capability detection *on the target*. But that is tricky because you have to build-and-run a binary *for the target*.
    - This PR picks the short-term solution, because the long-term solution is highly non-trivial, and it's already an improvement over individual `ignore-*`s all over the place.
    - Opened an issue about the long-term solution in #135928.
- Documents `//@ needs-subprocess` in rustc-dev-guide.
- Replace `ignore-{wasm,wasm32,emscripten,sgx}` with `needs-{subprocess,threads}` where suitable in tests.
- Some drive-by test changes as I was trying to figure out if I could use `needs-{subprocess,threads}` and found some bits needlessly distracting.

Count of tests that use `ignore-{wasm,wasm32,emscripten,sgx}` before and after this PR:

| State | `ignore-sgx` | `ignore-wasm` | `ignore-emscripten` |
| - | - | - | - |
| Before this PR | 96 | 88 | 207 |
| After this PR | 36 | 38 | 61 |

<details>
<summary>Commands used to find out locally</summary>

```
--- before

[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-sgx" tests | wc -l
96
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-wasm" tests | wc -l
88
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
207

--- after

[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-sgx" tests | wc -l
36
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-wasm" tests | wc -l
38
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
61
```
</details>

### Review advice

- Best reviewed commit-by-commit.
- Non-trivial test changes (not mechanically simple replacements) are split into individual commits to help with review. Their individual commit messages give some basic description of the changes.
- I *could* split some test changes out into another PR, but I found that I needed to change some tests to `needs-threads`, some to `needs-subprocess`, and some needed to use *both*, so they might conflict and become very annoying.

---

r? ``@ghost`` (need to run try jobs)

try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: i686-mingw
try-job: x86_64-mingw-1
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: aarch64-gnu
try-job: test-various
try-job: armhf-gnu
2025-01-24 16:25:43 +01:00
Mads Marquart 2e060866f0 Cross-link documentation for adding a new target
Both the target tier policy and the rustc-dev-guide has documentation on
this, let's make sure people see both.
2025-01-24 14:40:12 +01:00
Ada Alakbarova 168456e7a3
fix(solve/significant-changes): typo 2025-01-24 14:12:17 +01:00
Jakub Beránek 80aac13e78
Document Python formatting and linting in the rustc-dev-guide 2025-01-24 09:35:46 +01:00
Matthias Krüger 74962603cb
Rollup merge of #135489 - RalfJung:TryFromSliceError, r=tgross35
remove pointless allowed_through_unstable_modules on TryFromSliceError

This got added in https://github.com/rust-lang/rust/pull/132482 but the PR does not explain why. `@lukas-code` do you still remember? Also Cc `@Noratrieb` as reviewer of that PR.

If I understand the issue description correctly, all paths under which this type is exported are stable now: `core::array::TryFromSliceError` and `std::array::TryFromSliceError`. If that is the case, we shouldn't have the attribute; it's a terrible hack that should only be used when needed to maintain backward compatibility. Getting some historic information right is IMO *not* sufficient justification to risk accidentally exposing this type via more unstable paths today or in the future.
2025-01-24 08:08:06 +01:00
Matthias Krüger 520ca6b0da
Rollup merge of #135880 - bjorn3:misc_driver_refactors, r=oli-obk
Get rid of RunCompiler

The various `set_*` methods that have been removed can be replaced by setting the respective fields in the `Callbacks::config` implementation. `set_using_internal_features` was often forgotten and it's equivalent is now done automatically.
2025-01-23 19:54:26 +01:00
许杰友 Jieyou Xu (Joe) 0f175948cd rustc-dev-guide: document `needs-subprocess` directive 2025-01-23 20:51:28 +08:00
bjorn3 76f7584f6a Remove RunCompiler
It has become nothing other than a wrapper around run_compiler.
2025-01-23 09:38:58 +00:00
Jakub Beránek 3543f80951
Add test for checking used glibc symbols 2025-01-21 10:20:24 +01:00
Jakub Beránek 8c5b8fa814
Merge pull request #2215 from Kobzol/pull
rustc pull
2025-01-20 15:54:51 +01:00
Jakub Beránek 1e32114309 Merge from rustc 2025-01-20 14:12:41 +01:00
Jakub Beránek 0ae03351d2 Add portable SIMD to list of subtrees 2025-01-20 13:53:10 +01:00
Noratrieb 166fa3b79e Fix dev guide docs for error-pattern
I know it would have made more sense to make this PR to the dev guide
repo but I had already made the fix before I realized that.
2025-01-19 11:36:41 +01:00
Yuki Okushi c1b4cfaa96
Merge pull request #2211 from patrickoliveira15/patch/inference-invariance 2025-01-18 05:26:20 +09:00
Patrick Oliveira fbceffc7ca
remove outdated text about wfx implies 2025-01-17 12:04:42 -03:00
许杰友 Jieyou Xu (Joe) e9d9b29d06 compiletest: fix outdated `rustdoc-js` test suite name 2025-01-17 08:40:04 +08:00
lcnr 46458edee5 nyaa 2025-01-15 14:23:48 +01:00
Ryan Mehri b4940bbed6 fix some more typos 2025-01-14 23:01:42 -08:00
Noah Lev 7a4c3d3c30 Fix some broken links
* Rename `StringReader -> Lexer`
* Remove deleted `Query` struct
* Update some internal links
2025-01-14 21:52:33 -08:00
Ralf Jung 1cd70aaa2c rustc-dev-guide: add note about not adding rustc_allowed_through_unstable_modules to more items 2025-01-14 17:00:12 +01:00
许杰友 Jieyou Xu (Joe) a58b85a26c rustc-dev-guide: document `BOOTSTRAP_TRACING` and bootstrap `tracing` setup 2025-01-13 13:46:20 +08:00
onur-ozkan eecd68cf55 rustc-dev-guide: update outdated LLVM stamp filename
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-12 08:47:57 +03:00
许杰友 Jieyou Xu (Joe) aca4d07e08
Merge pull request #2205 from ehuss/ci-config 2025-01-11 00:34:43 +08:00
Eric Huss cd9705f029 Fix calculate-job-matrix.py link 2025-01-10 08:26:52 -08:00
Eric Huss 42768820fe Document how to find the configuration used in CI
This documents how to determine which settings are used in CI, since I
see this question come up regularly. We currently don't have a great way
to answer the question, but at least there is something.
2025-01-10 08:16:37 -08:00
Jakub Beránek 280d73878a Update rustc-dev-guide 2025-01-07 19:10:03 +01:00
Max Heller 0fd52366ca
Fix broken raw HTML (#2198) 2025-01-07 16:00:59 +08:00
许杰友 Jieyou Xu (Joe) 32835d18d8 Only keep label description in Forge docs 2025-01-06 18:59:36 +02:00
Jakub Beránek 1dad69ebd4
Add rustc-dev-guide to the list of repositories managed by josh (#2197) 2025-01-06 18:30:59 +08:00
Boxy 885fd79971 Split stuff out of representing types, and rewrite early/late bound chapter (#2192) 2025-01-05 17:51:45 +01:00
Stuart Cook bb71c99918 Describe how to use rust-analyzer with `rmake.rs` (#2191) 2025-01-05 17:51:45 +01:00
Tshepang Mbambo 027bbb345c fix comment 2025-01-05 17:51:45 +01:00
Tshepang Mbambo b3b1d09278 make paragraph more readable 2025-01-05 17:51:45 +01:00
Tshepang Mbambo 7dbf25b2f8 repetition not needed 2025-01-05 17:51:45 +01:00
Jakub Beránek eb70681870 Document josh subtrees and update subtree repository list (#2182) 2025-01-05 17:51:45 +01:00
Onur Özkan 63548be44e comment out FIXMEs to not display them on UI (#2186) 2025-01-05 17:51:45 +01:00
Max Heller 08b4cd8efc Use `id` attribute for `<a>` tags instead of deprecated `name` attribute (#2184) 2024-12-31 22:02:50 +08:00
Stuart Cook 6637742182 Remove stale implementation details of coverage instrumentation (#2179)
This level of detail in the dev guide is a maintenance burden; better to leave
this sort of thing to in-tree comments.
2024-12-30 12:02:52 +11:00
Martin Liška ddff18e30a Add missing link for [Node] (#2177) 2024-12-30 04:34:34 +08:00
Martin Liška ecad0213d7 Fix 403 received for HEAD request (#2176) 2024-12-30 04:33:45 +08:00
clubby789 5f32a38a3d Document `x test --no-capture` (#2174) 2024-12-28 19:55:20 +08:00
Stuart Cook 9b22375c78 Remove the `-test` suffix from normalize directives (#2172) 2024-12-28 17:32:43 +08:00
bjorn3 e70f551db6 Rework the driver docs (#2162) 2024-12-27 20:40:32 +08:00
clubby789 4e746875ed Document `forbid-output` for UI tests (#2171) 2024-12-27 12:21:52 +00:00
clubby789 b746f63983 completions: Zsh is now supported (#2173) 2024-12-27 09:03:10 +08:00
lcnr 6af30f87b7 region-outlives propagation (#2169)
* region-outlives propagation

* woops

* gamer
2024-12-23 10:17:51 +01:00
clubby789 a49028cf1e Document the `--debugger` flag (#2170) 2024-12-23 08:43:28 +00:00
Marco Ieni b5529ca9ba document the public ci dashboard (#2167) 2024-12-18 19:53:17 +08:00
Chris Bloodsworth 6afff2e610 Fix trivial typo of "query-fied"
"Query-field" should be "Query-fied" - three instances.
2024-12-18 08:01:33 +02:00
Tshepang Mbambo ee9a5845e0 typo, pause 2024-12-18 07:56:30 +02:00
Ryan Mehri 421c7282e1 Fix some typos 2024-12-18 07:56:30 +02:00
Eric Huss 766fbbbe3d Add suggestion for `--keep-stage 0` (#2164) 2024-12-18 01:00:38 +08:00
Connor Tsui 8e495d4b93 specify what a CGU is (#2163) 2024-12-16 15:12:01 +08:00
Tshepang Mbambo 1f2c5e10ff functionality removed from codebase (part 2) (#2160) 2024-12-10 22:27:37 +08:00
Tshepang Mbambo 8f3bf55222 functionality removed from codebase (#2159) 2024-12-10 22:11:11 +08:00
Orion Gonzalez 3ca330e1c3 remove polymorphization 2024-12-10 13:29:13 +00:00
Ralf Jung fcadf9608b squashing: recommend --keep-base when squashing without a conflict (#2157) 2024-12-07 06:59:23 +08:00
lcnr 1f851c0fc5 update section even more (#2156) 2024-12-05 20:30:36 +08:00
lcnr fccf752c1c closure constraints (#2155) 2024-12-05 12:01:46 +01:00
许杰友 Jieyou Xu (Joe) 740947ed6d Remove `//@ compare-output-lines-by-subset` directive (#2151) 2024-12-05 13:02:11 +08:00
许杰友 Jieyou Xu (Joe) df234c0f0e Document `needs-target-has-atomic` directive (#2154) 2024-12-05 13:01:46 +08:00
许杰友 Jieyou Xu (Joe) 8df3580d08 Spell out `git submodule deinit -f --all` (#2153) 2024-12-02 12:45:30 +08:00
许杰友 Jieyou Xu (Joe) 54c6a86858 Explain how to deal with exploded git submodules (#2152) 2024-12-02 12:38:56 +08:00
许杰友 Jieyou Xu (Joe) 67054cce92 Update `//@ proc-macro` aux build directive docs (#2149)
Co-authored-by: Eric Huss <eric@huss.org>
2024-11-29 13:01:15 +08:00
许杰友 Jieyou Xu (Joe) 65a59a3398 Remove `pretty-expanded` as it no longer exists (#2147) 2024-11-28 09:27:28 +08:00
Keith Wansbrough 8d9b40183e Fix trivial typo
"And" should be "An" - one instance.
2024-11-27 18:31:18 -05:00
Camille Gillot 0962f0e058 Remove -Zfuel. (#2032) 2024-11-27 18:31:58 +08:00
Boxy c4737a8d01 Remove constants section as it is outdated 2024-11-22 11:17:57 +00:00
Boxy f71456b753 Flatten generic parameter defs section 2024-11-22 11:17:57 +00:00
Taylor Cramer 6ea822df54 Add instructions to test error code docs (#2145) 2024-11-21 10:58:56 -08:00
Boxy 47a3a1d261 Reorganize the "Source Code Representation" chapters (#2142) 2024-11-21 20:28:23 +08:00
Yutaro Ohno 16e30472c9 Make `Diag` a clickable link in Suggestion section (#2140) 2024-11-20 16:21:27 +08:00
Ralf Jung 544b1fc77d update for rustc_intrinsic_const_stable_indirect (#2138)
Update for rust-lang/rust#133142
2024-11-18 18:16:00 +01:00
许杰友 Jieyou Xu (Joe) 65e7344ebb Mention `RUSTC_BOOTSTRAP` for misc testing (#2136) 2024-11-18 16:18:15 +08:00
许杰友 Jieyou Xu (Joe) 1f42c533c9 Document how to acquire `cdb.exe` (#2137) 2024-11-16 16:53:42 +00:00
许杰友 Jieyou Xu (Joe) 7ed13a5faf Document `max-llvm-major-version` directive (#2129) 2024-11-14 22:16:16 +08:00
许杰友 Jieyou Xu (Joe) 530b2eb228 Document `exact-llvm-major-version` directive (#2135) 2024-11-14 17:38:14 +08:00
Sam Estep 67dc382ac5 Note Rustfmt for separate rust-analyzer directory (#2134) 2024-11-13 21:37:25 +08:00
Tshepang Mbambo 4ff8d9a171 still accurate (#2133) 2024-11-10 13:18:32 +08:00
Tshepang Mbambo aaa854803f typo (#2132) 2024-11-10 11:36:49 +08:00
Tshepang Mbambo 13ae69b254 add valid date-check marker 2024-11-09 22:39:14 +02:00
Tbkhi c423c5636d Update parallel-rustc.md (#1926)
Co-authored-by: SparrowLii <liyuan179@huawei.com>
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
2024-11-08 16:59:36 +08:00
许杰友 Jieyou Xu (Joe) 5d7107b836 Rename `{ignore,only}-debug` -> `{ignore,needs}-{rustc,std}-debug-assertions` (#2101) 2024-11-08 15:06:55 +08:00
Ralf Jung 9532ff1e18 update const stability docs (#2111) 2024-11-05 17:26:56 +08:00
Barrett 6ef78e3691 diagnostics: lists should use the Oxford comma
we encountered this in https://github.com/rust-lang/rust/pull/131038

kinda felt like an unspoken rule so here's a more concrete
clarification.
2024-11-05 09:22:17 +02:00
Eric Huss a927b95352 Add a link for the `reference` compiletest header (#2096) 2024-11-04 22:40:57 +08:00
León Orell Valerian Liehr f0cba7ad09 Slightly fix up the glossary (#2127) 2024-11-04 13:03:02 +00:00
León Orell Valerian Liehr 117f9c526d Remove an mdbook workaround (#2124)
The original issue has been fixed, the workaround is no longer necessary.
2024-11-04 11:53:06 +00:00
Martin Liška be78802b46 Fix broken links (#2123) 2024-11-04 16:24:05 +08:00
Martin Liška b289220795 Fix minicore.rs link (#2122) 2024-11-04 16:17:28 +08:00
Nicholas Nethercote 2d1a0479a6 Update for recent dataflow simplifications. (#2121) 2024-11-04 15:57:00 +08:00
许杰友 Jieyou Xu (Joe) a54fe7590c Describe `minicore` test auxiliary and directive (#2097) 2024-11-04 14:26:20 +08:00
许杰友 Jieyou Xu (Joe) b088cb6d97 Fix and update docs for `needs-force-clang-based-tests` (#2085) 2024-11-04 14:17:37 +08:00
Martin Liška 6880243036 Fix borked links (#2119) 2024-11-03 15:58:43 +08:00
DianQK 168301374d Describe how to revert a PR (#2118)
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
2024-11-03 14:32:15 +08:00
Michael Goulet c5287a80f4 Ok now linkify 2024-11-02 16:45:00 -04:00
Michael Goulet a98daf1038 Try to fix footnotes 2024-11-02 15:16:04 -04:00
Martin Liška cbd5436e1d Fix rustc-related links that are 404 right now (#2112) 2024-11-02 20:53:31 +08:00
Michael Goulet 30f861c671 fix permalinks 2024-11-02 15:27:40 +08:00
Michael Goulet c21a829aab Async closures chapter 2024-11-02 15:27:40 +08:00