Skip to content

Rustc pull #2263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 116 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
68c4d98
Auto merge of #134740 - Flakebi:amdgpu-target, r=workingjubilee
bors Feb 10, 2025
95a3793
Auto merge of #135701 - calebzulawski:sync-from-portable-simd-2025-01…
bors Feb 10, 2025
20edddc
Auto merge of #133092 - madsmtm:bootstrap-deployment-target, r=Mark-S…
bors Feb 10, 2025
844a47a
compiler/rustc_data_structures/src/sync.rs: delete MappedLockGuard
safinaskar Feb 11, 2025
efa3dae
compiler/rustc_data_structures/src/sync.rs: delete Weak
safinaskar Feb 11, 2025
f0bcb73
compiler/rustc_data_structures/src/sync.rs: remove atomics, but not A…
safinaskar Feb 11, 2025
eeec2f4
src/doc/rustc-dev-guide/src/parallel-rustc.md: remove Arc and Rc (it …
safinaskar Feb 11, 2025
f9bb3ce
Auto merge of #136571 - marcoieni:ubuntu-24-large-runners, r=Mark-Sim…
bors Feb 11, 2025
66e5b92
dev-guide: Link to t-lang procedures for new features
madsmtm Feb 11, 2025
d2f697f
Auto merge of #136586 - Kobzol:lto-rustdoc-fix-stage-1, r=onur-ozkan
bors Feb 11, 2025
5cb9ff1
document the directive
tshepang Feb 11, 2025
d2f5709
Auto merge of #136605 - lsunsi:update-rustc-hash, r=lqd
bors Feb 11, 2025
981f1a3
Rollup merge of #136698 - jackpot51:i586-redox, r=RalfJung
GuillaumeGomez Feb 12, 2025
ccc23b7
Rollup merge of #136875 - BoxyUwU:rdg-push, r=jieyouxu
GuillaumeGomez Feb 12, 2025
c6481c9
Rollup merge of #136900 - workingjubilee:format-externabi-directly, r…
GuillaumeGomez Feb 12, 2025
9d518bd
Rollup merge of #136913 - Kobzol:kobzol-rotation, r=Kobzol
GuillaumeGomez Feb 12, 2025
b179734
Rollup merge of #136915 - eyelash:float-precision, r=workingjubilee
GuillaumeGomez Feb 12, 2025
6c9b3a9
Auto merge of #136918 - GuillaumeGomez:rollup-f6h21gg, r=GuillaumeGomez
bors Feb 12, 2025
a071c7c
Auto merge of #135336 - tshepang:patch-5, r=jieyouxu
bors Feb 12, 2025
a7a3e9c
Rollup merge of #136758 - workingjubilee:specify-opt-level-for-tests,…
GuillaumeGomez Feb 12, 2025
07edc20
Rollup merge of #136761 - workingjubilee:specify-opt-level-for-codege…
GuillaumeGomez Feb 12, 2025
9693073
Rollup merge of #136784 - yotamofek:pr/rustdoc-remove-buffer-take2, r…
GuillaumeGomez Feb 12, 2025
c19d31b
Rollup merge of #136838 - compiler-errors:escaping-unsize, r=fmease
GuillaumeGomez Feb 12, 2025
9f6af1a
Rollup merge of #136848 - Shourya742:2025-02-11-add-docs-and-ut-for-u…
GuillaumeGomez Feb 12, 2025
b54679e
Rollup merge of #136871 - madsmtm:link-to-lang-procedures, r=scottmcm
GuillaumeGomez Feb 12, 2025
6ab35de
Rollup merge of #136890 - saethlin:swap_nonoverlapping, r=RalfJung
GuillaumeGomez Feb 12, 2025
2c75af1
Rollup merge of #136901 - workingjubilee:stabilize-externabi-hashing-…
GuillaumeGomez Feb 12, 2025
4af2bc9
Rollup merge of #136907 - workingjubilee:middle-errors-cleanup, r=com…
GuillaumeGomez Feb 12, 2025
d3a3e2e
Rollup merge of #136916 - onur-ozkan:fix-cc2ar, r=jieyouxu
GuillaumeGomez Feb 12, 2025
eafa11c
Auto merge of #136943 - GuillaumeGomez:rollup-amtd3mq, r=GuillaumeGomez
bors Feb 12, 2025
d279d48
Auto merge of #135994 - 1c3t3a:rename-unsafe-ptr, r=oli-obk
bors Feb 12, 2025
db57a5f
intern valtrees
Feb 7, 2025
c8b6df4
Auto merge of #136535 - marcoieni:free-runners-remove-more-dirs, r=Ma…
bors Feb 13, 2025
8fb4785
Rollup merge of #134999 - Berrysoft:dev/new-cygwin-target, r=chenyuka…
jhpratt Feb 13, 2025
ae56be9
Rollup merge of #136858 - safinaskar:parallel-cleanup-2025-02-11-07-5…
jhpratt Feb 13, 2025
b492c43
Rollup merge of #136881 - dpaoliello:cleanllvm3, r=Zalathar
jhpratt Feb 13, 2025
d82596b
Rollup merge of #136888 - compiler-errors:never-read, r=Nadrieril
jhpratt Feb 13, 2025
663e60d
Rollup merge of #136948 - workingjubilee:split-off-extern-system-vara…
jhpratt Feb 13, 2025
8c82450
Rollup merge of #136949 - ehuss:wasm-bench-time, r=jhpratt
jhpratt Feb 13, 2025
8b45f4a
Auto merge of #136965 - jhpratt:rollup-bsnqvmf, r=jhpratt
bors Feb 13, 2025
470a207
Document bootstrap profiling
Kobzol Feb 12, 2025
812566d
Auto merge of #136593 - lukas-code:ty-value-perf, r=oli-obk
bors Feb 13, 2025
892a0ee
Auto merge of #134633 - GrigorenkoPV:get_disjoint_mut, r=cuviper
bors Feb 13, 2025
c1b73a1
Rollup merge of #136460 - real-eren:simplify-rustc_span-analyze, r=No…
workingjubilee Feb 14, 2025
906924a
Rollup merge of #136904 - pitaj:range-into_bounds, r=tgross35
workingjubilee Feb 14, 2025
d4127c5
Rollup merge of #136908 - mustartt:aix-mutex-destory-einval, r=joboet
workingjubilee Feb 14, 2025
2ddb2f8
Rollup merge of #136924 - Kobzol:bootstrap-tracing, r=jieyouxu
workingjubilee Feb 14, 2025
0180b07
Rollup merge of #136951 - compiler-errors:clause-binder, r=lqd
workingjubilee Feb 14, 2025
723592e
Rollup merge of #136981 - marcoieni:no-largedisk-loongarch, r=Kobzol
workingjubilee Feb 14, 2025
4aa8118
Rollup merge of #136992 - ehuss:update-backtrace, r=workingjubilee
workingjubilee Feb 14, 2025
9297af1
Rollup merge of #136993 - dpaoliello:cleanllvm4, r=workingjubilee
workingjubilee Feb 14, 2025
12d7eea
Auto merge of #137010 - workingjubilee:rollup-g00c07v, r=workingjubilee
bors Feb 14, 2025
0af7bd7
Auto merge of #136735 - scottmcm:transmute-nonnull, r=oli-obk
bors Feb 14, 2025
a0e5486
Auto merge of #136575 - scottmcm:nsuw-math, r=nikic
bors Feb 14, 2025
c61aa8f
Auto merge of #136324 - GrigorenkoPV:erf, r=tgross35
bors Feb 15, 2025
f32fc55
rustc-dev-guide: document `{ignore,only}-rustc_abi-x86-sse2`
jieyouxu Feb 15, 2025
9524993
Rollup merge of #136490 - Skepfyr:no-field-rest-pattern-attrs, r=comp…
matthiaskrgr Feb 15, 2025
0e3bbb6
Rollup merge of #137074 - jieyouxu:rustc_abi, r=onur-ozkan
matthiaskrgr Feb 15, 2025
408ea84
Rollup merge of #137076 - aDotInTheVoid:pingme-pingme-pingme, r=jieyouxu
matthiaskrgr Feb 15, 2025
f9dc140
Auto merge of #137093 - matthiaskrgr:rollup-72j7mut, r=matthiaskrgr
bors Feb 16, 2025
b1ea202
Auto merge of #137078 - bjorn3:sync_cg_clif-2025-02-15, r=bjorn3
bors Feb 16, 2025
141a8a1
rustc-dev-guide: document `COMPILER` and `COMPILER_FOR` tracing targets
jieyouxu Feb 15, 2025
e45d87f
Auto merge of #136363 - notriddle:notriddle/unresolved-link-unused-re…
bors Feb 16, 2025
b81c7f0
Auto merge of #136914 - marcoieni:arm-ubuntu-24, r=jdno
bors Feb 16, 2025
35c8087
Move some `Map` methods onto `TyCtxt`.
nnethercote Feb 2, 2025
3175304
Rollup merge of #136466 - nnethercote:start-removing-Map, r=cjgillot
matthiaskrgr Feb 17, 2025
b70f268
Rollup merge of #136671 - nnethercote:middle-limits, r=Nadrieril
matthiaskrgr Feb 17, 2025
12ee993
Rollup merge of #136817 - dianne:clean-and-comment-pat-migration, r=N…
matthiaskrgr Feb 17, 2025
194f551
Rollup merge of #136844 - thaliaarchi:const-io-error, r=ChrisDenton
matthiaskrgr Feb 17, 2025
7a3e6f5
Rollup merge of #137080 - jieyouxu:more-tracing, r=onur-ozkan
matthiaskrgr Feb 17, 2025
14ba171
Rollup merge of #137101 - GrigorenkoPV:str-inherent-lint, r=Urgau
matthiaskrgr Feb 17, 2025
ffcce13
Rollup merge of #137140 - Noratrieb:const-move, r=jieyouxu,compiler-e…
matthiaskrgr Feb 17, 2025
8cc662a
Rollup merge of #137095 - saethlin:use-hash64-for-hashes, r=workingju…
matthiaskrgr Feb 17, 2025
fea2408
Rollup merge of #137100 - fmease:hirtylow-rm-clauses-wrapper, r=compi…
matthiaskrgr Feb 17, 2025
a328495
Rollup merge of #137105 - zachs18:cow-derefpure-restrict, r=Nadrieril
matthiaskrgr Feb 17, 2025
b6b204e
Auto merge of #137163 - matthiaskrgr:rollup-ovgfkns, r=matthiaskrgr
bors Feb 17, 2025
98b2bf9
Auto merge of #137164 - matthiaskrgr:rollup-dj5826k, r=matthiaskrgr
bors Feb 17, 2025
e124f2d
Auto merge of #135763 - nikic:llvm-20, r=cuviper
bors Feb 17, 2025
019264f
Add Zed to dev guide suggested workflows page
ChaiTRex Feb 18, 2025
654035f
Auto merge of #133852 - x17jiri:cold_path, r=saethlin
bors Feb 18, 2025
209dd46
docs(dev): Remove reference to features_untracked
epage Feb 18, 2025
1520629
docs(dev): Access features as functions, not members
epage Feb 18, 2025
97b80c8
add rustc-dev doc about bootstrap tools
onur-ozkan Feb 19, 2025
c4d5fa6
Rollup merge of #127793 - ChaiTRex:zed_support, r=Kobzol
matthiaskrgr Feb 19, 2025
ec4ad2e
Rollup merge of #136301 - hkBst:patch-33, r=thomcc
matthiaskrgr Feb 19, 2025
4190629
Rollup merge of #136347 - allevo:patch-1, r=Amanieu
matthiaskrgr Feb 19, 2025
d407238
Rollup merge of #136794 - cberner:stabilize, r=joshtriplett
matthiaskrgr Feb 19, 2025
ca2580a
Rollup merge of #137094 - RalfJung:softfloat-means-no-simd, r=tgross35
matthiaskrgr Feb 19, 2025
9d7d3f9
Rollup merge of #137227 - epage:features_untracked, r=compiler-errors
matthiaskrgr Feb 19, 2025
9e86176
Rollup merge of #137232 - estebank:from-residual-note, r=petrochenkov
matthiaskrgr Feb 19, 2025
523648b
Rollup merge of #137251 - Zalathar:holes-visitor, r=jieyouxu
matthiaskrgr Feb 19, 2025
34aa5c2
Auto merge of #137284 - matthiaskrgr:rollup-deuhk46, r=matthiaskrgr
bors Feb 19, 2025
c92f8bf
Rollup merge of #120580 - HTGAzureX1212:HTGAzureX1212/issue-45795, r=…
matthiaskrgr Feb 19, 2025
d7f562f
Rollup merge of #136690 - Voultapher:use-more-explicit-and-reliable-p…
matthiaskrgr Feb 19, 2025
e310db8
Rollup merge of #136815 - ChrisDenton:fix-mingw-ci, r=Kobzol
matthiaskrgr Feb 19, 2025
e99e074
Rollup merge of #136923 - samueltardieu:push-vxxqvqwspssv, r=davidtwco
matthiaskrgr Feb 19, 2025
9435186
Rollup merge of #137155 - thaliaarchi:wtf8-organize, r=ChrisDenton
matthiaskrgr Feb 19, 2025
fc2f886
Auto merge of #137290 - matthiaskrgr:rollup-a7xdbi4, r=matthiaskrgr
bors Feb 19, 2025
f20e0e7
Auto merge of #137023 - Kobzol:bump-sccache, r=marcoieni
bors Feb 20, 2025
bce0daa
Auto merge of #137058 - scottmcm:trunc-unchecked, r=nikic
bors Feb 20, 2025
0ffe41c
Auto merge of #136771 - scottmcm:poke-slice-iter-next, r=joboet
bors Feb 20, 2025
cb81eac
Auto merge of #137192 - kornelski:windows-tls-lto, r=ChrisDenton
bors Feb 21, 2025
9c8ff35
Auto merge of #133436 - nnethercote:rm-NtVis-NtTy, r=petrochenkov
bors Feb 22, 2025
3f70a2f
Auto merge of #137189 - Kobzol:update-host-llvm, r=nikic
bors Feb 22, 2025
27dffea
Auto merge of #137215 - onur-ozkan:rustc-tool-build-stages, r=jieyoux…
bors Feb 23, 2025
b12f947
Rollup merge of #135354 - Walnut356:msvc_lldb, r=wesleywiser
jhpratt Feb 23, 2025
22a7c27
Rollup merge of #136826 - xizheyin:issue-136737, r=thomcc
jhpratt Feb 23, 2025
db0701d
Rollup merge of #137423 - Urgau:imprv-pretty-hir, r=compiler-errors
jhpratt Feb 23, 2025
c0a94c1
Auto merge of #137466 - jhpratt:rollup-spyi02y, r=jhpratt
bors Feb 23, 2025
56b3b27
Auto merge of #137237 - cuviper:stage0, r=Mark-Simulacrum
bors Feb 23, 2025
716d5d3
Auto merge of #137225 - RalfJung:vectorcall, r=nnethercote
bors Feb 23, 2025
0da5fce
Auto merge of #137271 - nikic:gep-nuw-2, r=scottmcm
bors Feb 24, 2025
7805a6d
Auto merge of #137285 - yotamofek:pr/rustdoc/pulldown-escaping, r=Gui…
bors Feb 24, 2025
d528dad
Auto merge of #133832 - madsmtm:apple-symbols.o, r=DianQK
bors Feb 25, 2025
5bda7ef
Preparing for merge from rustc
BoxyUwU Feb 25, 2025
3a4c5b0
Merge from rustc
BoxyUwU Feb 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/rustc-driver-interacting-with-the-ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::path::Path;
use std::sync::Arc;

use rustc_ast_pretty::pprust::item_to_string;
use rustc_driver::{Compilation, run_compiler};
use rustc_driver::{run_compiler, Compilation};
use rustc_interface::interface::{Compiler, Config};
use rustc_middle::ty::TyCtxt;

Expand Down Expand Up @@ -77,7 +77,7 @@ impl rustc_driver::Callbacks for MyCallbacks {
let item = hir_krate.item(id);
// Use pattern-matching to find a specific node inside the main function.
if let rustc_hir::ItemKind::Fn { body, .. } = item.kind {
let expr = &tcx.hir().body(body).value;
Comment on lines 79 to -80
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the merge conflict

let expr = &tcx.hir_body(body).value;
if let rustc_hir::ExprKind::Block(block, _) = expr.kind {
if let rustc_hir::StmtKind::Let(let_stmt) = block.stmts[0].kind {
if let Some(expr) = let_stmt.init {
Expand Down
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124cc92199ffa924f6b4c7cc819a85b65e0c3984
4ecd70ddd1039a3954056c1071e40278048476fa
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
- [Prologue](./building/bootstrapping/intro.md)
- [What Bootstrapping does](./building/bootstrapping/what-bootstrapping-does.md)
- [How Bootstrap does it](./building/bootstrapping/how-bootstrap-does-it.md)
- [Writing tools in Bootstrap](./building/bootstrapping/writing-tools-in-bootstrap.md)
- [Debugging bootstrap](./building/bootstrapping/debugging-bootstrap.md)

# High-level Compiler Architecture
Expand Down
16 changes: 16 additions & 0 deletions src/building/bootstrapping/debugging-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ $ BOOTSTRAP_TRACING=CONFIG_HANDLING=TRACE ./x build library --stage 1

[tracing-env-filter]: https://docs.rs/tracing-subscriber/0.3.19/tracing_subscriber/filter/struct.EnvFilter.html

##### FIXME(#96176): specific tracing for `compiler()` vs `compiler_for()`

The additional targets `COMPILER` and `COMPILER_FOR` are used to help trace what
`builder.compiler()` and `builder.compiler_for()` does. They should be removed
if [#96176][cleanup-compiler-for] is resolved.

[cleanup-compiler-for]: https://github.com/rust-lang/rust/issues/96176

### Using `tracing` in bootstrap

Both `tracing::*` macros and the `tracing::instrument` proc-macro attribute need to be gated behind `tracing` feature. Examples:
Expand Down Expand Up @@ -160,6 +168,14 @@ For `#[instrument]`, it's recommended to:
- Explicitly pick an instrumentation name via `name = ".."` to distinguish between e.g. `run` of different steps.
- Take care to not cause diverging behavior via tracing, e.g. building extra things only when tracing infra is enabled.

### Profiling bootstrap

You can use the `COMMAND` tracing target to trace execution of most commands spawned by bootstrap. If you also use the `BOOTSTRAP_PROFILE=1` environment variable, bootstrap will generate a Chrome JSON trace file, which can be visualized in Chrome's `chrome://tracing` page or on https://ui.perfetto.dev.

```bash
$ BOOTSTRAP_TRACING=COMMAND=trace BOOTSTRAP_PROFILE=1 ./x build library
```

### rust-analyzer integration?

Unfortunately, because bootstrap is a `rust-analyzer.linkedProjects`, you can't ask r-a to check/build bootstrap itself with `tracing` feature enabled to get relevant completions, due to lack of support as described in <https://github.com/rust-lang/rust-analyzer/issues/8521>.
23 changes: 23 additions & 0 deletions src/building/bootstrapping/writing-tools-in-bootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Writing tools in Bootstrap

There are three types of tools you can write in bootstrap:

- **`Mode::ToolBootstrap`**
Use this for tools that don’t need anything from the in-tree compiler and can run with the stage0 `rustc`.
The output is placed in the "stage0-bootstrap-tools" directory. This mode is for general-purpose tools built
entirely with the stage0 compiler, including target libraries and only works for stage 0.

- **`Mode::ToolStd`**
Use this for tools that rely on the locally built std. The output goes into the "stageN-tools" directory.
This mode is rarely used, mainly for `compiletest` which requires `libtest`.

- **`Mode::ToolRustc`**
Use this for tools that depend on both the locally built `rustc` and the target `std`. This is more complex than
the other modes because the tool must be built with the same compiler used for `rustc` and placed in the "stageN-tools"
directory. When you choose `Mode::ToolRustc`, `ToolBuild` implementation takes care of this automatically.
If you need to use the builder’s compiler for something specific, you can get it from `ToolBuildResult`, which is
returned by the tool's [`Step`].

Regardless of the tool type you must return `ToolBuildResult` from the tool’s [`Step`] implementation and use `ToolBuild` inside it.

[`Step`]: https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/trait.Step.html
11 changes: 11 additions & 0 deletions src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ You can run `./x setup editor` and select `helix`, which will prompt you to
create `languages.toml` with the recommended configuration for Helix. The
recommended settings live at [`src/etc/rust_analyzer_helix.toml`].

### Zed

Zed comes with built-in LSP and rust-analyzer support.
It can be configured through `.zed/settings.json`, as described
[here](https://zed.dev/docs/configuring-languages). Selecting `zed`
in `./x setup editor` will prompt you to create a `.zed/settings.json`
file which will configure Zed with the recommended configuration. The
recommended `rust-analyzer` settings live
at [`src/etc/rust_analyzer_zed.json`].

## Check, check, and check again

When doing simple refactoring, it can be useful to run `./x check`
Expand Down Expand Up @@ -406,4 +416,5 @@ load this completion.
[`src/etc/rust_analyzer_settings.json`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_settings.json
[`src/etc/rust_analyzer_eglot.el`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_eglot.el
[`src/etc/rust_analyzer_helix.toml`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_helix.toml
[`src/etc/rust_analyzer_zed.json`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_zed.json
[`src/etc/pre-push.sh`]: https://github.com/rust-lang/rust/blob/master/src/etc/pre-push.sh
8 changes: 5 additions & 3 deletions src/implementing_new_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ smoothly.
**NOTE: this section is for *language* features, not *library* features,
which use [a different process].**

See also [the Rust Language Design Team's procedures][lang-propose] for
proposing changes to the language.

[a different process]: ./stability.md
[lang-propose]: https://lang-team.rust-lang.org/how_to/propose.html

## The @rfcbot FCP process

Expand Down Expand Up @@ -163,9 +167,7 @@ a new unstable feature:

1. Prevent usage of the new feature unless the feature gate is set.
You can check it in most places in the compiler using the
expression `tcx.features().$feature_name` (or
`sess.features_untracked().$feature_name` if the
tcx is unavailable)
expression `tcx.features().$feature_name()`

If the feature gate is not set, you should either maintain
the pre-feature behavior or raise an error, depending on
Expand Down
4 changes: 2 additions & 2 deletions src/mir/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ The most important rule for
this representation is that every value must be uniquely represented. In other
words: a specific value must only be representable in one specific way. For example: there is only
one way to represent an array of two integers as a `ValTree`:
`ValTree::Branch(&[ValTree::Leaf(first_int), ValTree::Leaf(second_int)])`.
`Branch([Leaf(first_int), Leaf(second_int)])`.
Even though theoretically a `[u32; 2]` could be encoded in a `u64` and thus just be a
`ValTree::Leaf(bits_of_two_u32)`, that is not a legal construction of `ValTree`
`Leaf(bits_of_two_u32)`, that is not a legal construction of `ValTree`
(and is very complex to do, so it is unlikely anyone is tempted to do so).

These rules also mean that some values are not representable. There can be no `union`s in type
Expand Down
5 changes: 0 additions & 5 deletions src/parallel-rustc.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ are implemented differently depending on whether `parallel-compiler` is true.

| data structure | parallel | non-parallel |
| -------------------------------- | --------------------------------------------------- | ------------ |
| Weak | std::sync::Weak | std::rc::Weak |
| Atomic{Bool}/{Usize}/{U32}/{U64} | std::sync::atomic::Atomic{Bool}/{Usize}/{U32}/{U64} | (std::cell::Cell<bool/usize/u32/u64>) |
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
| Lock\<T> | (parking_lot::Mutex\<T>) | (std::cell::RefCell) |
| RwLock\<T> | (parking_lot::RwLock\<T>) | (std::cell::RefCell) |
Expand All @@ -58,7 +56,6 @@ are implemented differently depending on whether `parallel-compiler` is true.
| WriteGuard | parking_lot::RwLockWriteGuard | std::cell::RefMut |
| MappedWriteGuard | parking_lot::MappedRwLockWriteGuard | std::cell::RefMut |
| LockGuard | parking_lot::MutexGuard | std::cell::RefMut |
| MappedLockGuard | parking_lot::MappedMutexGuard | std::cell::RefMut |

- These thread-safe data structures are interspersed during compilation which
can cause lock contention resulting in degraded performance as the number of
Expand Down Expand Up @@ -173,12 +170,10 @@ Here are some resources that can be used to learn more:
- [This list of interior mutability in the compiler by nikomatsakis][imlist]

[`rayon`]: https://crates.io/crates/rayon
[Arc]: https://doc.rust-lang.org/std/sync/struct.Arc.html
[imlist]: https://github.com/nikomatsakis/rustc-parallelization/blob/master/interior-mutability-list.md
[irlo0]: https://internals.rust-lang.org/t/parallelizing-rustc-using-rayon/6606
[irlo1]: https://internals.rust-lang.org/t/help-test-parallel-rustc/11503
[monomorphization]: backend/monomorph.md
[parallel-rustdoc]: https://github.com/rust-lang/rust/issues/82741
[Rc]: https://doc.rust-lang.org/std/rc/struct.Rc.html
[rustc-rayon]: https://github.com/rust-lang/rustc-rayon
[tracking]: https://github.com/rust-lang/rust/issues/48685
3 changes: 3 additions & 0 deletions src/tests/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ Some examples of `X` in `ignore-X` or `only-X`:
`ignore-coverage-map`, `ignore-coverage-run`
- When testing a dist toolchain: `dist`
- This needs to be enabled with `COMPILETEST_ENABLE_DIST_TESTS=1`
- The `rustc_abi` of the target: e.g. `rustc_abi-x86_64-sse2`

The following directives will check rustc build settings and target
settings:
Expand Down Expand Up @@ -192,6 +193,8 @@ settings:
specified atomic widths, e.g. the test with `//@ needs-target-has-atomic: 8,
16, ptr` will only run if it supports the comma-separated list of atomic
widths.
- `needs-dynamic-linking` - ignores if target does not support dynamic linking
(which is orthogonal to it being unable to create `dylib` and `cdylib` crate types)

The following directives will check LLVM support:

Expand Down