Commit graph

2627 commits

Author SHA1 Message Date
Askar Safin
0a21f1d0a2 tree-wide: parallel: Fully removed all Lrc, replaced with Arc 2025-02-03 13:25:57 +03:00
bjorn3
6a566ee092 Replace ParseSess::set_dcx with DiagCtxt::set_emitter
Replacing the error emitter doesn't accidentally clear the error count.
2025-02-02 16:09:39 +00:00
bors
854f22563c Auto merge of #136350 - matthiaskrgr:rollup-6eqfyvh, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #134531 ([rustdoc] Add `--extract-doctests` command-line flag)
 - #135860 (Compiler: Finalize dyn compatibility renaming)
 - #135992 (Improve documentation when adding a new target)
 - #136194 (Support clobber_abi in BPF inline assembly)
 - #136325 (Delay a bug when indexing unsized slices)
 - #136326 (Replace our `LLVMRustDIBuilderRef` with LLVM-C's `LLVMDIBuilderRef`)
 - #136330 (Remove unnecessary hooks)
 - #136336 (Overhaul `rustc_middle::util`)
 - #136341 (Remove myself from vacation)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-31 20:16:46 +00:00
Matthias Krüger
f818842ce2
Rollup merge of #135992 - madsmtm:new-target-docs, r=jieyouxu
Improve documentation when adding a new target

https://github.com/rust-lang/rust/pull/133631#issuecomment-2607877936 shows that it can be a bit difficult process-wise to add a new target.

I've added a bit of text to the docs, suggesting that users add the target defintion/spec first, and later work on `std` support.

I also found that we have two places where we document how to add a new target. I've linked these for now, but they should probably be merged somehow in the future.

`@rustbot` label A-docs
r? compiler
CC `@workingjubilee` who's worked a lot on target specs IIRC.
2025-01-31 12:28:16 +01:00
bors
7f36543a48 Auto merge of #136332 - jhpratt:rollup-aa69d0e, r=jhpratt
Rollup of 9 pull requests

Successful merges:

 - #132156 (When encountering unexpected closure return type, point at return type/expression)
 - #133429 (Autodiff Upstreaming - rustc_codegen_ssa, rustc_middle)
 - #136281 (`rustc_hir_analysis` cleanups)
 - #136297 (Fix a typo in profile-guided-optimization.md)
 - #136300 (atomic: extend compare_and_swap migration docs)
 - #136310 (normalize `*.long-type.txt` paths for compare-mode tests)
 - #136312 (Disable `overflow_delimited_expr` in edition 2024)
 - #136313 (Filter out RPITITs when suggesting unconstrained assoc type on too many generics)
 - #136323 (Fix a typo in conventions.md)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-31 09:42:28 +00:00
Ryan Cumming
ba5386aeed
Fix a typo in conventions.md
Introduced in #135950
2025-01-31 10:23:46 +11:00
Michael Goulet
08d7e9dfe5 Rework rustc_dump_vtable 2025-01-30 15:30:04 +00:00
bors
5a45ab9738 Auto merge of #136038 - compiler-errors:outlives, r=lcnr
Simplify and consolidate the way we handle construct `OutlivesEnvironment` for lexical region resolution

This is best reviewed commit-by-commit. I tried to consolidate the API for lexical region resolution *first*, then change the API when it was finally behind a single surface.

r? lcnr or reassign
2025-01-30 11:40:32 +00:00
Stuart Cook
48b3eca63e
Rollup merge of #136254 - BoxyUwU:rdg-push, r=Kobzol
Rustc dev guide subtree update

r? `@Kobzol`
2025-01-30 14:25:06 +11:00
Boxy
0b48908512
Rustc pull 2025-01-29 16:46:09 +00:00
许杰友 Jieyou Xu (Joe)
bec4359db9
Merge pull request #2227 from Joren-vanGoethem/master 2025-01-29 05:03:36 +00:00
许杰友 Jieyou Xu (Joe)
7fa9822b3d
Merge pull request #2231 from yegeunyang/#2069 2025-01-29 05:02:55 +00:00
yegeunyang
4260e3a5b8 Touch up a sentence 2025-01-28 22:56:52 -06:00
许杰友 Jieyou Xu (Joe)
d8cca31abf
Merge pull request #2232 from yegeunyang/#2114
Add a link to declare_lint! macro doc in diagnostics.md
2025-01-29 04:08:54 +00:00
yegeunyang
0127e6479f Add link to declare_lint! macro 2025-01-28 21:05:12 -06:00
yegeunyang
941ab8cd18 Add "Writing tests" section 2025-01-28 20:42:26 -06:00
Mohammad Omidvar
5dfe0f8cf4 Make crate AST mutation accessible for driver callback 2025-01-28 19:45:20 +00:00
Michael Goulet
48b7e38c06 Move outlives env computation into methods 2025-01-28 18:55:03 +00:00
Michael Howell
5861aa21d9 Add some extra pointers for rustdoc frontend devs 2025-01-28 11:04:26 -07:00
Boxy
815c5d4eee Merge from rustc 2025-01-28 11:57:19 +00:00
Boxy
62102ee041 Preparing for merge from rustc 2025-01-28 11:57:04 +00:00
Joren-vanGoethem
d63796f69a
Update about-this-guide.md 2025-01-28 07:43:16 +01:00
Jakub Beránek
2412289fc9
Fix rustc-pull CI's bash commands 2025-01-27 23:34:43 +01:00
Noah Lev
885641bab1
Merge pull request #2223 from marxin/CI-cache-restore-key
CI: use key-restore for cache GH action
2025-01-26 14:21:09 -08:00
Eric Huss
5210a8d1e9
Correct information on dylib compression
Compression of dylibs was removed in https://github.com/rust-lang/rust/pull/113695 (and decompression removed in https://github.com/rust-lang/rust/pull/132402).
2025-01-26 12:08:48 -08:00
许杰友 Jieyou Xu (Joe)
97efda63b3 rustc-dev-guide: update bootstrap tracing docs 2025-01-27 01:24:53 +08:00
León Orell Valerian Liehr
20818c47a5
Remove accidental leading empty line in code block 2025-01-26 02:42:09 +01:00
Eric Huss
40e051f1bf Update boring lines to sync with rustdoc 2025-01-25 13:49:32 -08:00
Martin Liska
1392e074b7 CI: use key-restore for cache GH action
It seems one can't overwrite a cache entry:
```
Failed to save: Unable to reserve cache with key linkcheck--0.8.1, another job may be creating this cache. More details: Cache already exists. Scope: refs/heads/master, Key: linkcheck--0.8.1, Version: 33f8fd511bed9c91c40778bc5c27cb58425caa894ab50f9c5705d83cb78660e0
Warning: Cache save failed.
```

A proper solution is to use `restore-keys`:
https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
2025-01-25 18:22:00 +01:00
Yuki Okushi
bda56643be
Merge pull request #2221 from ada4a/patch-1 2025-01-25 14:00:46 +09:00
Matthias Krüger
dcd43d3896
Rollup merge of #135829 - Kobzol:rustc-push, r=jieyouxu
Rustc dev guide subtree update

r? ``@ghost``
2025-01-24 23:25:44 +01:00
Matthias Krüger
c459b17d24
Rollup merge of #135950 - Kobzol:tidy-python-improvements, r=onur-ozkan
Tidy Python improvements

Fixes display of Python formatting diffs in tidy, and refactors the code to make it simpler and more robust. Also documents Python formatting and linting in the Rustc dev guide.

Fixes: https://github.com/rust-lang/rust/issues/135942

r? `@onur-ozkan`
2025-01-24 16:25:44 +01:00
Matthias Krüger
e96bb6ae1c
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
11de4b71bd 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
17a14b627e
fix(solve/significant-changes): typo 2025-01-24 14:12:17 +01:00
Jakub Beránek
353d916a0a
Revert "Add @bors rollup=never to rustc-push PR body" 2025-01-24 13:59:05 +01:00
Jakub Beránek
cd7be9295c
Document Python formatting and linting in the rustc-dev-guide 2025-01-24 09:35:46 +01:00
Matthias Krüger
a3fb2a0572
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
7d31ae7f35
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)
669f4bce4d rustc-dev-guide: document needs-subprocess directive 2025-01-23 20:51:28 +08:00
bjorn3
a77776cc1d Remove RunCompiler
It has become nothing other than a wrapper around run_compiler.
2025-01-23 09:38:58 +00:00
bjorn3
974db1a6e4 Remove set_make_codegen_backend and set_file_loader
They can both be set inside the config callback too.
2025-01-23 09:38:58 +00:00
Jakub Beránek
5be02d6f05
Add @bors rollup=never to rustc-push PR body 2025-01-21 17:00:28 +01:00
Jakub Beránek
ef9349db86
Add test for checking used glibc symbols 2025-01-21 10:20:24 +01:00
Jakub Beránek
28b5e11e2a Send a message to Zulip when a sync finishes 2025-01-20 18:15:59 +01:00
Jakub Beránek
470ab13c5c
Merge pull request #2215 from Kobzol/pull
rustc pull
2025-01-20 15:54:51 +01:00
Jakub Beránek
1e0204beae Merge from rustc 2025-01-20 14:12:41 +01:00
Jakub Beránek
808bd95586 Preparing for merge from rustc 2025-01-20 14:11:57 +01:00
Jakub Beránek
29be13d4be Add portable SIMD to list of subtrees 2025-01-20 13:53:10 +01:00
许杰友 Jieyou Xu (Joe)
d6b0828d79 docs: document how to install a suitable josh-proxy locally
Co-authored-by: Boxy <rust@boxyuwu.dev>
2025-01-20 12:35:45 +08:00