Commit Graph

283263 Commits

Author SHA1 Message Date
Oli Scherer
a2c1211b6d Hide the end of ranges in pretty printing if it's also the maximum of the type 2025-03-06 10:50:23 +00:00
Oli Scherer
e8f7a382be Remove the Option part of range ends in the HIR 2025-03-06 10:47:40 +00:00
Oli Scherer
0e7b283573 Avoid having to handle an Option in the type system 2025-03-06 10:03:11 +00:00
Oli Scherer
4f2b108816 Prefer a two value enum over bool 2025-03-06 10:03:11 +00:00
bors
30f168ef81 Auto merge of - compiler-errors:inline-fnonce, r=saethlin
Inline `FnOnce`/`FnMut`/`Fn` shims once again

This PR fixes the argument checking for `extern "rust-call"` ABI functions with a spread arg, which do no expect their arguments to be exploded from a tuple like closures do.

Secondly, it removes the hack that prevented them from being inlined. This results in more work done by the compiler, but it does end up allowing us to inline functions we didn't before.

Fixes 
2025-03-05 18:39:17 +00:00
bors
07b5eeebc9 Auto merge of - jieyouxu:rollup-skdt0oz, r=jieyouxu
Rollup of 20 pull requests

Successful merges:

 -  (dec2flt: Clean up float parsing modules)
 -  (Retire the legacy `Makefile`-based `run-make` test infra)
 -  (Count char width at most once in `Formatter::pad`)
 -  (Make `ptr_cast_add_auto_to_object` lint into hard error)
 -  (Added documentation for flushing per )
 -  (Perform deeper compiletest path normalization for `$TEST_BUILD_DIR` to account for compare-mode/debugger cases, and normalize long type file filename hashes)
 -  (Look for `python3` first on MacOS, not `py`)
 -  (Upload Datadog metrics with citool)
 -  (Slightly reformat `std::fs::remove_dir_all` error docs)
 -  (Check signature WF when lowering MIR body)
 -  ([illumos] attempt to use posix_spawn to spawn processes)
 -  (uefi: Add Service Binding Protocol abstraction)
 -  (Stabilize `string_extend_from_within`)
 -  (Only use implied bounds hack if bevy, and use deeply normalize in implied bounds hack)
 -  (Various coretests improvements)
 -  (Make `rust.description` more general-purpose and pass `CFG_VER_DESCRIPTION`)
 -  (Remove unsizing coercions for tuples)
 -  (Resume one waiter at once in deadlock handler)
 -  (mir_build: Integrate "simplification" steps into match-pair-tree creation)
 -  (compiler: add `ExternAbi::is_rustic_abi`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-05 15:09:49 +00:00
许杰友 Jieyou Xu (Joe)
fe4c0850fe
Rollup merge of - workingjubilee:is-rustic-abi, r=compiler-errors
compiler: add `ExternAbi::is_rustic_abi`

Various parts of the compiler were hand-rolling this extremely simple check that is nonetheless easy to get wrong as the compiler evolves over time. Discourage them from being so "original" again by replacing it with a single implementation on the type that represents these ABIs. This simplifies a surprising amount of code as a result.

Also fixes , an ICE that emerged due to other checks being made stricter.
2025-03-05 21:46:46 +08:00
许杰友 Jieyou Xu (Joe)
9d1b2f7fda
Rollup merge of - Zalathar:irrefutable, r=Nadrieril
mir_build: Integrate "simplification" steps into match-pair-tree creation

The “simplification” step helps to prepare THIR patterns for lowering into MIR, and originally dates back to the earliest days of MIR in the compiler.

Over time, various intermediate data structures have been introduced (e.g. `MatchPair`, later renamed to `MatchPairTree`) that reduce the need for a separate simplification step, because some of the necessary simplifications can be built into the construction of those intermediate structures instead. This PR continues that process to its logical conclusion and removes the simplification step entirely, by integrating its remaining responsibilities into match-pair-tree creation: flattening “irrefutable” nodes, collecting bindings/ascriptions in flat lists, and sorting or-patterns after other subpatterns.

This has a few immediate benefits:
- We can remove `TestCase::Irrefutable`, which was not allowed to exist after simplification, and was much larger than other test-case variants.
- We can make `MatchPairTree::place` non-optional, because only irrefutable nodes could fail to have a place.

In the future, this should also help with some ideas I have for simplifying how `AscribeUserType` and `ExpandedConstant` nodes are handled, by representing them as side-data keyed by THIR pattern ID, so that they are no longer their own kinds of THIR pattern node.
2025-03-05 21:46:45 +08:00
许杰友 Jieyou Xu (Joe)
927c11fcb7
Rollup merge of - SparrowLii:waiter, r=nnethercote
Resume one waiter at once in deadlock handler

When multiple query loop errors occur in the code, only one waiter should be resumed at a time to avoid waking up multiple waiters at the same time and causing deadlock due to thread grabbing.

This fixes the UI failures in 

cc `@Zoxc` `@cjgillot` `@nnethercote` `@bjorn3` `@Kobzol`

Zulip discussion [here](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc/topic/Deadlocks.20and.20Rayon)

Edit: We can't reproduce these bugs with the existing test suits, so we keep them until we merge 
UPDATES 
UPDATES 
UPDATES 
2025-03-05 21:46:45 +08:00
许杰友 Jieyou Xu (Joe)
257b4947ed
Rollup merge of - Darksonn:no-tuple-unsize, r=oli-obk
Remove unsizing coercions for tuples

See https://github.com/rust-lang/rust/issues/42877#issuecomment-2686010847 and below comments for justification.

Tracking issue: 
Fixes: 
2025-03-05 21:46:44 +08:00
许杰友 Jieyou Xu (Joe)
dac4ffd5c0
Rollup merge of - onur-ozkan:cfg-ver-description, r=pietroalbini,weihanglo
Make `rust.description` more general-purpose and pass `CFG_VER_DESCRIPTION`

Moves the `description` field from the `rust` section to the `build` section as it can be useful for tools and is not specific to rustc. Also passes this value to tool builds through the `CFG_VER_DESCRIPTION` env.

Motivated from https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Propagate.20rust.2Edescription.20to.20tools.20in.20dist.20build
2025-03-05 21:46:43 +08:00
许杰友 Jieyou Xu (Joe)
4aa61e77ff
Rollup merge of - bjorn3:coretests_improvements, r=jieyouxu,onur-ozkan
Various coretests improvements

The first commit is not yet strictly necessary as directly testing libcore works though useless work, but will be necessary once https://github.com/rust-lang/rust/pull/136642 migrates the liballoc tests into a separate package. The second commit fixes https://github.com/rust-lang/rust/issues/137478 and ensures that coretests actually gets tested on all CI job. The third commit fixes an error that didn't get caught because coretests doesn't run on the wasm32 CI job.
2025-03-05 21:46:42 +08:00
许杰友 Jieyou Xu (Joe)
6c60abf51a
Rollup merge of - compiler-errors:no-implied-bounds-hack-unless-bevy, r=lcnr
Only use implied bounds hack if bevy, and use deeply normalize in implied bounds hack

Consolidates the implied bounds computation mode into a single function, which deeply normalizes, and if it's in **compat** mode (for bevy), it extracts outlives bounds from the infcx.

Previously, we were using the implied bounds compat mode in two cases:
1. During WF, if it detects `ParamSet`
2. EVERYWHERE ELSE (lol) -- e.g. borrowck, predicate entailment, etc.

While I think this is fine, and the net effect was just that we emitted fewer diagnostics, it makes me uncomfortable that all crates were using the supposed "compat" code.

Fixes 
2025-03-05 21:46:42 +08:00
许杰友 Jieyou Xu (Joe)
604d1ba61c
Rollup merge of - aDotInTheVoid:for-iurii, r=ibraheemdev
Stabilize `string_extend_from_within`

FCP'd here: https://github.com/rust-lang/rust/issues/103806#issuecomment-2674989531.

Closes  .
2025-03-05 21:46:41 +08:00
许杰友 Jieyou Xu (Joe)
24d481cc29
Rollup merge of - Ayush1325:uefi-service-binding, r=Noratrieb
uefi: Add Service Binding Protocol abstraction

- Some UEFI protocols such as TCP4, TCP6, UDP4, UDP6, etc are managed by service binding protocol.
- A new instance of such protocols is created and destroyed using the corresponding service binding protocol.
- This PR adds abstractions to make using such protocols simpler using Rust Drop trait.
- The reason to add these abstractions in a seperate PR from TCP4 Protocol is to make review easier.

[EFI_SERVICE_BINDING_PROTCOL](https://uefi.org/specs/UEFI/2.11/11_Protocols_UEFI_Driver_Model.html#efi-service-binding-protocol)

cc ````@nicholasbishop````
2025-03-05 21:46:40 +08:00
许杰友 Jieyou Xu (Joe)
fde23c87a5
Rollup merge of - sunshowers:illumos-posix-spawn, r=Mark-Simulacrum
[illumos] attempt to use posix_spawn to spawn processes

illumos has `posix_spawn`, and the very newest versions also have `_addchdir`, so use that. POSIX standardized this function so I also added a weak symbol lookup for the non `_np` version. (illumos has both.)

This probably also works on Solaris, but I don't have access to an installation to validate this so I decided to focus on illumos instead.

This is a nice ~4x performance improvement for process creation. My go-to as usual is nextest against the clap repo, which acts as a stress test for process creation -- with [this commit]:

```console
$ cargo nextest run -E 'not test(ui_tests) and not test(example_tests)'
before: Summary [   1.747s] 879 tests run: 879 passed, 2 skipped
after:  Summary [   0.445s] 879 tests run: 879 passed, 2 skipped
```

[this commit]: fde45f9aea
2025-03-05 21:46:40 +08:00
许杰友 Jieyou Xu (Joe)
5df9a9f45c
Rollup merge of - compiler-errors:mir-wf, r=lcnr
Check signature WF when lowering MIR body

Alternative to .

https://github.com/rust-lang/rust/pull/137233#issuecomment-2667879143

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

We do this check in `mir_drops_elaborated_and_const_checked` and not during `mir_promoted` because that may result in borrowck cycles if WF requires looking into an opaque hidden type. This causes some TAIT tests to fail unnecessarily.

r? lcnr

try-job: test-various
2025-03-05 21:46:39 +08:00
许杰友 Jieyou Xu (Joe)
4f1a0479a7
Rollup merge of - jieyouxu:remove_dir_all, r=Mark-Simulacrum
Slightly reformat `std::fs::remove_dir_all` error docs

To make the error cases easier to spot on a quick glance, as I've been bitten by this a couple of times already 💀

cc .
2025-03-05 21:46:38 +08:00
许杰友 Jieyou Xu (Joe)
ab29c707ba
Rollup merge of - Kobzol:citool-datadog, r=marcoieni
Upload Datadog metrics with citool

This removes one Python script and also the installation of the `datadog-ci` JavaScript package, along with the corresponding package and lock file.

r? `@ghost`
2025-03-05 21:46:37 +08:00
许杰友 Jieyou Xu (Joe)
f22b93964d
Rollup merge of - jyn514:macos-x, r=Mark-Simulacrum
Look for `python3` first on MacOS, not `py`

`py` is not installed by default *and* trying to run it results in a popup asking if you want to install it. `python3` is installed by default.

This hopefully should not be too disruptive to people on Windows, since they should be going through `x.ps1` instead anyway. Just in case, I've added a check for Cygwin and Msys (i'm not sure how else you'd get a bash shell on windows).

I've tested this on macOS, WSL, "git bash" (which appears to be MSYS), and MSVC with `bash -c ./x` (which runs in WSL, but differently than interactive bash 🙃). I haven't tested Cygwin, which is unsupported anyway, but the code tries to make it work.
2025-03-05 21:46:36 +08:00
许杰友 Jieyou Xu (Joe)
9aaf46ea23
Rollup merge of - jieyouxu:long-type-path-compare-mode, r=lqd
Perform deeper compiletest path normalization for `$TEST_BUILD_DIR` to account for compare-mode/debugger cases, and normalize long type file filename hashes

Fixes .

### Summary

- Whereas previously `$TEST_BUILD_DIR` is a normalization of `/path/to/build/test/<test_suite_name>/`, we now more deeply normalize. `$TEST_BUILD_DIR` now becomes a normalization of `/path/to/build/test/<test_suite_name>/<subdirs>/$name.$revision.$compare_mode.$debugger/` to normalize away path name differences when `--compare-mode` and/or `--debugger` are specified.
- We also centralize the normalization of long type name hashes

cf. https://github.com/rust-lang/rust/pull/136328#discussion_r1936760908.

### Review advice

- Best reviewed commit-by-commit.
- Split into 3 commits:
    - **Commit 1**: compiletest changes to have `$TEST_BUILD_DIR` more deeply normalize.
    - **Commit 2**: remove per-test hacks for long type path hash normalizations, and rebless tests *specifically* affected by that.
    - **Commit 3**: rebless other tests that were changed as a side-effect of deeper `$TEST_BUILD_DIR` normalizations.

**Commit 2** is created via first finding tests that try to perform long type file hash normalizations on an ad hoc, per-test basis:

```
rg --no-ignore -l --no-ignore -F -e "long-type" tests/ui/**/*.rs
```

<details>
<summary>Tests with ad hoc long-type hash normalizations</summary>

```
tests/ui/type_length_limit.rs
tests/ui/traits/on_unimplemented_long_types.rs
tests/ui/regions/issue-102374.rs
tests/ui/recursion/recursion.rs
tests/ui/recursion/issue-83150.rs
tests/ui/recursion/issue-23122-2.rs
tests/ui/methods/inherent-bound-in-probe.rs
tests/ui/issues/issue-67552.rs
tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs
tests/ui/issues/issue-20413.rs
tests/ui/issues/issue-8727.rs
tests/ui/infinite/infinite-instantiation.rs
tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.rs
tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs
tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs
tests/ui/error-codes/E0275.rs
tests/ui/diagnostic-width/secondary-label-with-long-type.rs
tests/ui/diagnostic-width/long-e0277.rs
tests/ui/diagnostic-width/non-copy-type-moved.rs
tests/ui/diagnostic-width/long-E0308.rs
tests/ui/diagnostic-width/E0271.rs
tests/ui/diagnostic-width/binop.rs
```
</details>

These ad hoc normalizations were removed, and they are reblessed.

r? `````@lqd`````
2025-03-05 21:46:35 +08:00
许杰友 Jieyou Xu (Joe)
6c4ce3ad95
Rollup merge of - pcorwin:master, r=tgross35
Added documentation for flushing per 

Resolves 
2025-03-05 21:46:34 +08:00
许杰友 Jieyou Xu (Joe)
21b473334f
Rollup merge of - traviscross:TC/make-ptr_cast_add_auto_to_object-hard-error, r=oli-obk
Make `ptr_cast_add_auto_to_object` lint into hard error

In Rust 1.81, we added a FCW lint (including linting in dependencies) against pointer casts that add an auto trait to dyn bounds.  This was part of work making casts of pointers involving trait objects stricter, and was part of the work needed to restabilize trait upcasting.

We considered just making this a hard error, but opted against it at that time due to breakage found by crater.  This breakage was mostly due to the `anymap` crate which has been a persistent problem for us.

It's now a year later, and the fact that this is not yet a hard error is giving us pause about stabilizing arbitrary self types and `derive(CoercePointee)`.  So let's see about making a hard error of this.

r? ghost

cc ```@adetaylor``` ```@Darksonn``` ```@BoxyUwU``` ```@RalfJung``` ```@compiler-errors``` ```@oli-obk``` ```@WaffleLapkin```

Related:

- https://github.com/rust-lang/rust/pull/135881
- https://github.com/rust-lang/rust/issues/136702
- https://github.com/rust-lang/rust/pull/136776

Tracking:

- https://github.com/rust-lang/rust/issues/127323
- https://github.com/rust-lang/rust/issues/44874
- https://github.com/rust-lang/rust/issues/123430
2025-03-05 21:46:34 +08:00
许杰友 Jieyou Xu (Joe)
1b9b515674
Rollup merge of - thaliaarchi:formatter-pad-char-count, r=m-ou-se
Count char width at most once in `Formatter::pad`

When both width and precision flags are specified, then `Formatter::pad` counts the character width twice. Instead, record the character width when truncating it to the precision, so it does not need to be recomputed. Simplify control flow so the cases are more clear.

Related:
- 6c9e708f4b (`fmt::Formatter::pad`: don't call chars().count() more than one time, 2021-09-01): Reduce counting chars from thrice to twice in worst case
- ede39aeb33 (feat: reinterpret `precision` field for strings, 2016-06-29): Change meaning of precision for strings
- b820748ff5 (Implement formatting arguments for strings and integers, 2013-08-10): Implement `Formatter::pad`
2025-03-05 21:46:33 +08:00
许杰友 Jieyou Xu (Joe)
65da1ffe41
Rollup merge of - jieyouxu:makefile-be-gone, r=Kobzol
Retire the legacy `Makefile`-based `run-make` test infra

The final piece of [porting run-make tests to use Rust ](https://github.com/rust-lang/rust/issues/121876).
Closes .
Closes .
Closes  (no longer using `wc`).
Closes  (no longer a problem in current form of that test; we don't ignore the test on `aarch64-unknown-linux-gnu`).

### Summary

This PR removes the legacy `Makefile`-based `run-make` test infra which has served us well over the years. The legacy infra is no longer needed since we ported all of `Makefile`-based `run-make` tests to the new `rmake.rs` infra.

Additionally, this PR:

- Removes `tests/run-make/tools.mk` since no more `Makefile`-based tests remain.
- Updates `tests/run-make/README.md` and rustc-dev-guide docs to remove mention about `Makefile`-based `run-make` tests
- Update test suite requirements in rustc-dev-guide on Windows to no longer need MSYS2 (they should also now run successfully on native Windows MSVC).
- Update `triagebot.toml` to stop backlinking to .

**Thanks to everyone who helped in this effort to modernize the `run-make` test infra and test suite!**

r? bootstrap
2025-03-05 21:46:32 +08:00
许杰友 Jieyou Xu (Joe)
9b8accbeb6
Rollup merge of - tgross35:dec2flt-refactoring, r=Noratrieb
dec2flt: Clean up float parsing modules

This is the first portion of my work adding support for parsing and printing `f16`. Changes in `float.rs` replace the magic constants with expressions and add some use of generics to better support the new float types. Everything else is related to documentation or naming; there are no functional changes in this PR.

This can be reviewed by commit.
2025-03-05 21:46:31 +08:00
Zalathar
e3e74bc89a Make MatchPairTree::place non-optional
As the invariant indicated, this place could only be none for
`TestCase::Irrefutable` nodes, which no longer exist.
2025-03-05 23:26:00 +11:00
Zalathar
e05df1cb5d Remove the separate simplify step for match-pair trees
What remained of this simplification process has been integrated into
construction of the match-pair trees.
2025-03-05 23:26:00 +11:00
Zalathar
854feae887 Remove TestCase::Irrefutable 2025-03-05 23:25:59 +11:00
Zalathar
ef44273838 Populate pattern bindings/ascriptions while building MatchPairTree 2025-03-05 23:25:59 +11:00
Zalathar
281455add7 Make MatchPairTree::for_pattern push its output node to a vector 2025-03-05 23:25:59 +11:00
Zalathar
7a31456c1c Make field_match_pairs push its output nodes to a vector 2025-03-05 23:25:59 +11:00
Jakub Beránek
6c2c5dcb6e
Apply review remarks 2025-03-05 12:13:29 +01:00
Jakub Beránek
6166f3d212
Remove Python metric upload script and package.json 2025-03-05 12:13:29 +01:00
Jakub Beránek
6130b3da18
Upload Datadog average CPU usage metric in citool 2025-03-05 12:13:29 +01:00
Jakub Beránek
26e42de17c
Make citool compilation faster 2025-03-05 12:11:15 +01:00
bors
4559163ccb Auto merge of - workingjubilee:rollup-5bsotpz, r=workingjubilee
Rollup of 15 pull requests

Successful merges:

 -  (Stabilize [T]::split_off... methods)
 -  (Stabilize `box_uninit_write`)
 -  (Do not recover missing lifetime with random in-scope lifetime)
 -  (Allow struct field default values to reference struct's generics)
 -  (Simplify `<Postorder as Iterator>::size_hint`)
 -  (Update MSVC INSTALL.md instructions to recommend VS 2022 + recent Windows 10/11 SDK)
 -  (Add ``dyn`` keyword to `E0373` examples)
 -  (Remove unused `PpMode::needs_hir`)
 -  (rustdoc search: increase strictness of typechecking)
 -  (Fix some typos)
 -  (Add `avr-none` to SUMMARY.md and platform-support.md)
 -  (Remove obsolete comment from DeduceReadOnly)
 -  (Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync"")
 -  (Pretty-print `#[deprecated]` attribute in HIR.)
 -  (Make CrateItem::body() function return an option)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-05 06:59:11 +00:00
onur-ozkan
9646c2f642 replace rust.description with build.description
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 08:39:56 +03:00
onur-ozkan
853e34dbe1 pass CFG_VER_DESCRIPTION to tool builds
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 08:39:53 +03:00
onur-ozkan
92956e8cd6 add change-entry
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 08:39:42 +03:00
onur-ozkan
31e612bd7b move rust.description to build.description
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 08:38:40 +03:00
Jubilee Young
8a689878ce compiler: use is_rustic_abi in ty_utils
expands some conditionals to include different "rustic" ABIs, so that we
actually handle passing args through all "rustic" ABIs
2025-03-04 19:57:51 -08:00
Jubilee
3065925c7e
Rollup merge of - celinval:chores-item-has-body, r=compiler-errors
Make CrateItem::body() function return an option

When we initially created `CrateItem`, it would only represent items that contain a body.

That is no longer the case, for now, make this explicit by expanding the APIs to retrieve the item body.

This is related to https://github.com/rust-lang/project-stable-mir/issues/34

r? `@oli-obk`
2025-03-04 19:37:08 -08:00
Jubilee
a69982e00a
Rollup merge of - obi1kenobi:pg/pretty-print-more-attrs, r=compiler-errors
Pretty-print `#[deprecated]` attribute in HIR.

Pretty-print `#[deprecated]` attribute in a form closer to how it might appear in Rust source code, rather than using a `Debug`-like representation.

Consider the following Rust code:
```rust
#[deprecated]
pub struct PlainDeprecated;

#[deprecated = "here's why this is deprecated"]
pub struct DirectNote;

#[deprecated(since = "1.2.3", note = "here's why this is deprecated")]
pub struct SinceAndNote;
```

Here's the previous output:
```
#[attr="Deprecation{deprecation: Deprecation{since: Unspecifiednote:
suggestion: }span: }")]
struct PlainDeprecated;

#[attr="Deprecation{deprecation: Deprecation{since: Unspecifiednote:
here's why this is deprecatedsuggestion: }span: }")]
struct DirectNote;

#[attr="Deprecation{deprecation: Deprecation{since: NonStandard(1.2.3)note:
here's why this is deprecatedsuggestion: }span: }")]
struct SinceAndNote;
```

Here's the new output:
```rust
#[deprecated]
struct PlainDeprecated;

#[deprecated = "here's why this is deprecated"]
struct DirectNote;

#[deprecated(since = "1.2.3", note = "here's why this is deprecated"]
struct SinceAndNote;
```

Also includes a test for `#[diagnostic::(..)]` attributes, though their behavior is not changed here. I already wrote the test, so I figured it probably won't hurt to have it.

Related to discussion in .

r? `@jdonszelmann`
2025-03-04 19:37:07 -08:00
Jubilee
f32ba6b6ca
Rollup merge of - safinaskar:2025-03-04-revert-parallel, r=compiler-errors
Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync""

Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync""

This reverts commit 02406903b0.

See https://github.com/rust-lang/rust/pull/136858#discussion_r1977482593

cc "Parallel Rustc Front-end" https://github.com/rust-lang/rust/issues/113349

r? SparrowLii

``@rustbot`` label: +WG-compiler-parallel
``@rustbot`` label: +C-cleanup
2025-03-04 19:37:06 -08:00
Jubilee
7f6ad7f96e
Rollup merge of - tmiasko:deduce-comment, r=compiler-errors
Remove obsolete comment from DeduceReadOnly

The situation described in the comment does arise in practice now and described panic is long gone.
2025-03-04 19:37:06 -08:00
Jubilee
349f6af4e9
Rollup merge of - tgross35:avr-book-links, r=jieyouxu
Add `avr-none` to SUMMARY.md and platform-support.md

This was missed this in the implementation PR, so update the links here.
2025-03-04 19:37:05 -08:00
Jubilee
131867b68b
Rollup merge of - fuyangpengqi:master, r=Amanieu
Fix some typos

Fix some typos
2025-03-04 19:37:04 -08:00
Jubilee
c32124fac0
Rollup merge of - lolbinarycat:rustdoc-js-less-expect-error, r=notriddle
rustdoc search: increase strictness of typechecking

r? `@notriddle`

The signature of `makePrimitiveElement` is now more accurate.

I believe the intent of the code is that `name` cannot be null if `bindingName.name` is null, and I believe typescript is expressive enough to encode this, but I'm not quite sure how, or if this would be desirable.

I'm also introducing mapped types into `rustdoc.d.ts`, but I think it's worth it in order to avoid keeping two interfaces in sync.

I may add more commits onto this to remove more ``@ts-expect-error`` instances.
2025-03-04 19:37:04 -08:00
Jubilee
dfbd9b2d81
Rollup merge of - Zalathar:needs-hir, r=compiler-errors
Remove unused `PpMode::needs_hir`

This method was added in  to avoid an overzealous `span_delayed_bug` ICE in specific circumstances, but the only caller was subsequently removed in , which presumably avoids the problem in a more principled way.
2025-03-04 19:37:03 -08:00