Commit graph

316532 commits

Author SHA1 Message Date
bors
b3cda168c8 Auto merge of #151701 - JonathanBrouwer:rollup-PvhvBqX, r=JonathanBrouwer
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#151290 (Recover from struct literals with placeholder or empty path)
 - rust-lang/rust#148187 (Remove uses of `&mut CmResolver`)
 - rust-lang/rust#151368 (Rustdoc performance improvements)
 - rust-lang/rust#151374 (some more rustc_borrowck cleanups)
 - rust-lang/rust#151536 (Fix sanitizer target builds on CI)
 - rust-lang/rust#151626 (Remove `Deref<Target = TyCtxt>` from `QueryCtxt`)
 - rust-lang/rust#151661 (Suggest changing `iter`/`into_iter` when the other was meant)
2026-01-26 20:33:36 +00:00
Folkert de Vries
0ef4c3aca7
use simd_splat for the set1 functions 2026-01-26 21:03:43 +01:00
Esteban Küber
4a27be6972 Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
xtqqczze
abcd22d5ed Omit standard copyright notice
Remove copyright notices for files licensed under the standard terms (MIT OR Apache-2.0).
2026-01-26 17:31:34 +00:00
Jonathan Brouwer
9ad4ae88cf
Rollup merge of #151661 - estebank:issue-68095, r=mati865
Suggest changing `iter`/`into_iter` when the other was meant

When encountering a call to `iter` that should have been `into_iter` and vice-versa, provide a structured suggestion:

```
error[E0271]: type mismatch resolving `<IntoIter<{integer}, 3> as IntoIterator>::Item == &{integer}`
  --> $DIR/into_iter-when-iter-was-intended.rs:5:37
   |
LL |     let _a = [0, 1, 2].iter().chain([3, 4, 5].into_iter());
   |                               ----- ^^^^^^^^^^^^^^^^^^^^^ expected `&{integer}`, found integer
   |                               |
   |                               required by a bound introduced by this call
   |
note: the method call chain might not have had the expected associated types
  --> $DIR/into_iter-when-iter-was-intended.rs:5:47
   |
LL |     let _a = [0, 1, 2].iter().chain([3, 4, 5].into_iter());
   |                                     --------- ^^^^^^^^^^^ `IntoIterator::Item` is `{integer}` here
   |                                     |
   |                                     this expression has type `[{integer}; 3]`
note: required by a bound in `std::iter::Iterator::chain`
  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
help: consider not consuming the `[{integer}, 3]` to construct the `Iterator`
   |
LL -     let _a = [0, 1, 2].iter().chain([3, 4, 5].into_iter());
LL +     let _a = [0, 1, 2].iter().chain([3, 4, 5].iter());
   |
```

Finish addressing the original case in rust-lang/rust#68095. Only the case of chaining a `Vec` or `[]` is left unhandled.
2026-01-26 18:19:17 +01:00
Jonathan Brouwer
e1760d43cf
Rollup merge of #151626 - Zalathar:qcx-deref, r=tiif
Remove `Deref<Target = TyCtxt>` from `QueryCtxt`

Explicitly writing `self.tcx` is easy enough, and lets us remove a bit of non-essential deref magic.
2026-01-26 18:19:16 +01:00
Jonathan Brouwer
a975a74a7a
Rollup merge of #151536 - jakos-sec:fix-asan-target, r=Kobzol
Fix sanitizer target builds on CI
2026-01-26 18:19:15 +01:00
Jonathan Brouwer
e875916a05
Rollup merge of #151374 - BoxyUwU:borrowck_cleanup_3, r=lcnr
some more rustc_borrowck cleanups

r? lcnr
2026-01-26 18:19:14 +01:00
Jonathan Brouwer
621c712108
Rollup merge of #151368 - GuillaumeGomez:librustdoc-perf, r=yotamofek
Rustdoc performance improvements

A few things I had sitting around for a while. Let's check what perf says about them

r? @yotamofek
2026-01-26 18:19:14 +01:00
Jonathan Brouwer
bd85bab5a5
Rollup merge of #148187 - LorrensP-2158466:cm-res-variance, r=petrochenkov
Remove uses of `&mut CmResolver`

Before rust-lang/rust#148329, using CmResolver in closures was not possible when trying to reborrow. This pr changes uses of `&mut CmResolver` into a bare `CmResolver`, to keep the code clean (and to not have `&mut &mut Resolver`)

r? @petrochenkov
2026-01-26 18:19:13 +01:00
Jonathan Brouwer
6ff5bb3968
Rollup merge of #151290 - Unique-Usman:ua/nostruct, r=estebank
Recover from struct literals with placeholder or empty path

Based on earlier work by León Orell Valerian Liehr.
2026-01-26 18:19:12 +01:00
Luka Blašković
d541277ce1 os allow missing_docs 2026-01-26 17:08:00 +00:00
rustbot
1f6a55d8ba Update books 2026-01-26 18:00:52 +01:00
cyrgani
6e7a87c5c5 merge Mark and Unmark traits 2026-01-26 15:24:22 +00:00
Guillaume Gomez
21ebd03e5e Try to reduce rustdoc GUI tests flakyness 2026-01-26 16:18:36 +01:00
cyrgani
356107e0b4 remove some unneeded impls 2026-01-26 14:59:54 +00:00
cyrgani
d5328c545a introduce MarkedX type aliases 2026-01-26 14:59:25 +00:00
cyrgani
f8d05b6c85 flatten the api_tags module 2026-01-26 14:59:25 +00:00
zakie
8d6b2f6a49 docs: fix broken Xtensa installation link 2026-01-26 23:36:26 +09:00
cyrgani
5fef797f6e inline Writer and Reader type aliases 2026-01-26 14:10:11 +00:00
cyrgani
bf1c3f6a14 move Types from with_api! to Server 2026-01-26 14:10:11 +00:00
Guillaume Gomez
bd453118ee Improve code 2026-01-26 14:59:50 +01:00
Guillaume Gomez
dd42a9f118 Replace regex with find calls 2026-01-26 14:59:50 +01:00
Guillaume Gomez
3757ce6d1f Remove a string comparison and reduce number of clones in Hierarchy::add_path 2026-01-26 14:59:49 +01:00
bors
474276961f Auto merge of #151676 - adwinwhite:next-263, r=lcnr
Do not return incorrectly constrained opaques in `method_autoderef_steps`


Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/263

r? @lcnr
2026-01-26 13:54:11 +00:00
Jonathan Pallant
6ecb3f33f0
Adds two new Tier 3 targets - aarch64v8r-unknown-none and aarch64v8r-unknown-none-softfloat.
The existing `aarch64-unknown-none` target assumes Armv8.0-A as a baseline. However, Arm recently released the Arm Cortex-R82 processor which is the first to implement the Armv8-R AArch64 mode architecture. This architecture is similar to Armv8-A AArch64, however it has a different set of mandatory features, and is based off of Armv8.4. It is largely unrelated to the existing Armv8-R architecture target (`armv8r-none-eabihf`), which only operates in AArch32 mode.

The second `aarch64v8r-unknown-none-softfloat` target allows for possible Armv8-R AArch64 CPUs with no FPU, or for use-cases where FPU register stacking is not desired. As with the existing `aarch64-unknown-none` target we have coupled FPU support and Neon support together - there is no 'has FPU but does not have NEON' target proposed even though the architecture technically allows for it.

This PR was developed by Ferrous Systems on behalf of Arm. Arm is the owner of these changes.
2026-01-26 12:43:52 +00:00
Piotr Osiewicz
0df94dd94e checksum-freshness: Fix incorrect hash/file length values of binary
dependency files
2026-01-26 12:09:55 +01:00
Chris Denton
aaeb550f6f
Update windows bindings in std 2026-01-26 10:59:16 +00:00
Chris Denton
8a32fcee2f
Update backtrace 2026-01-26 10:57:35 +00:00
Boxy
dab7c0923e Misc cleanups to borrowck crate 2026-01-26 10:24:15 +00:00
Folkert de Vries
a45071b797
Merge pull request #2002 from rust-lang/rustc-pull
Rustc pull update
2026-01-26 10:18:16 +00:00
Folkert de Vries
246399cb7d
use simd_splat 2026-01-26 10:38:04 +01:00
Adwin White
f6efe7e1d5 don't return incorrectly constrained opaques in method_autoderef_steps 2026-01-26 17:30:18 +08:00
bors
db6bc0f6a4 Auto merge of #151674 - Zalathar:rollup-pNhrXnP, r=Zalathar
Rollup of 2 pull requests

Successful merges:

 - rust-lang/rust#151612 (Update documentation for `cold_path`, `likely`, and `unlikely`)
 - rust-lang/rust#151670 (compiletest: Parse aux `proc-macro` directive into struct)
2026-01-26 09:25:45 +00:00
Stuart Cook
43b955a4dd
Rollup merge of #151670 - Enselic:proc-macro-struct, r=Zalathar
compiletest: Parse aux `proc-macro` directive into struct

This PR does not introduce any changes. It is pure refactoring to make PR rust-lang/rust#151258 smaller so it is easier to see what that PR is about, as discussed [here](https://github.com/rust-lang/rust/pull/151258#issuecomment-3766358454).

r? @Zalathar
2026-01-26 19:52:42 +11:00
Stuart Cook
443c5b0742
Rollup merge of #151612 - tgross35:cold-path-doc, r=scottmcm
Update documentation for `cold_path`, `likely`, and `unlikely`

* Add a note recommending benchmarks to `cold_path`, as other hints have
* Note that `cold_path` can be used to implement `likely` and `unlikely`
* Update the tracking issue for the `likely_unlikely` feature

Tracking issue: https://github.com/rust-lang/rust/issues/136873
Tracking issue: https://github.com/rust-lang/rust/issues/151619
2026-01-26 19:52:41 +11:00
bors
0462e8f7e5 Auto merge of #151667 - Zalathar:rollup-OzG0S5m, r=Zalathar
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#151611 (Improve is_ascii performance on x86_64 with explicit SSE2 intrinsics)
 - rust-lang/rust#150705 (Add missing mut to pin.rs docs)
 - rust-lang/rust#151294 (compiletest: add implied `needs-target-std` for `codegen` mode tests unless annotated with `#![no_std]`/`#![no_core]`)
 - rust-lang/rust#151589 (Add a `documentation` remapping path scope for rustdoc usage)
 - rust-lang/rust#151639 (Fix broken WASIp1 reference link)
 - rust-lang/rust#151645 (Update `sysinfo` version to `0.38.0`)
2026-01-26 05:42:45 +00:00
Martin Nordholts
30e41dec0c compiletest: Parse aux proc-macro directive into struct
To minimize the diff when adding features the aux `proc-macro`
directive.
2026-01-26 06:39:33 +01:00
The rustc-josh-sync Cronjob Bot
7168e5d9e1 Merge ref '873d4682c7' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@873d4682c7
Filtered ref: rust-lang/stdarch@003d326514
Upstream diff: 48622726c4...873d4682c7

This merge was created using https://github.com/rust-lang/josh-sync.
2026-01-26 04:34:26 +00:00
The rustc-josh-sync Cronjob Bot
a4f92e5d81 Prepare for merging from rust-lang/rust
This updates the rust-version file to 873d4682c7.
2026-01-26 04:32:16 +00:00
Juho Kahala
29596f87be rename uN::{gather,scatter}_bits to uN::{extract,deposit}_bits 2026-01-26 06:28:42 +02:00
Stuart Cook
ec48041b20
Rollup merge of #151645 - GuillaumeGomez:update-sysinfo, r=Kobzol
Update `sysinfo` version to `0.38.0`

Some bugfixes and added supported for NetBSD.

r? @Kobzol
2026-01-26 14:36:23 +11:00
Stuart Cook
237d17fc69
Rollup merge of #151639 - zzaekkii:wasm32-wasip1, r=madsmtm
Fix broken WASIp1 reference link

### Location (URL)
https://doc.rust-lang.org/rustc/platform-support/wasm32-wasip1.html

<img width="800" alt="image" src="https://github.com/user-attachments/assets/b9402b3a-db7b-405f-b4ef-d849c03ad893" />

### Summary
The WASIp1 reference link in the `wasm32-wasip1` platform documentation currently points to a path that no longer exists in the WASI repository.

The WASI project recently migrated the WASI 0.1 (preview1) documentation from the `legacy/preview1` directory to the dedicated `wasi-0.1` branch (WebAssembly/WASI#855).

This updates the link to point to the intended historical WASIp1 reference, which matches the documented intent of the `wasm32-wasip1` target.
2026-01-26 14:36:23 +11:00
Stuart Cook
e811f07736
Rollup merge of #151589 - Urgau:documentation-scope, r=GuillaumeGomez
Add a `documentation` remapping path scope for rustdoc usage

This PR adds a new remapping path scope for rustdoc usage: `documentation`, instead of rustdoc abusing the other scopes for it's usage.

Like remapping paths in rustdoc, this scope is unstable. (rustdoc doesn't even have yet an equivalent to [rustc `--remap-path-scope`](https://doc.rust-lang.org/nightly/rustc/remap-source-paths.html#--remap-path-scope)).

I also took the opportunity to add a bit of documentation in rustdoc book.
2026-01-26 14:36:22 +11:00
Stuart Cook
504c7fe65d
Rollup merge of #151294 - jieyouxu:infer-needs-target-std, r=Zalathar
compiletest: add implied `needs-target-std` for `codegen` mode tests unless annotated with `#![no_std]`/`#![no_core]`

A `codegen` mode test (such as `codegen-llvm` test suite) will now by default have an implied `//@ needs-target-std` directive, *unless* the test explicitly has an `#![no_std]`/`#![no_core]` attribute which disables this behavior.

- When a test has both `#![no_std]`/`#![no_core]` and `//@ needs-target-std`, the explicit `//@ needs-target-std` directive will cause the test to be ignored for targets that do not support std still.

This is to make it easier to test out-of-tree targets / custom targets (and targets not tested in r-l/r CI) without requiring target maintainers to do a bunch of manual `//@ needs-target-std` busywork.

Context: [#t-compiler/help > &#96;compiletest&#96; cannot find &#96;core&#96; library for target != host](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60compiletest.60.20cannot.20find.20.60core.60.20library.20for.20target.20!.3D.20host/with/568652419)

## Implementation remarks

This is an alternative version of https://github.com/rust-lang/rust/pull/150672, with some differences:

- *This* PR applies this implied-`needs-target-std` behavior to all `codegen` test mode tests.
- *This* PR does the synthetic directive injection in the same place as implied-`codegen-run` directives. Both are of course hacks, but at least they're together next to each other.
2026-01-26 14:36:22 +11:00
Stuart Cook
ef849a2c7d
Rollup merge of #150705 - justanotheranonymoususer:patch-1, r=joboet
Add missing mut to pin.rs docs

Per my understanding, needed for mut access next line.
2026-01-26 14:36:21 +11:00
Stuart Cook
a6e8a31b86
Rollup merge of #151611 - bonega:improve-is-slice-is-ascii-performance, r=folkertdev
Improve is_ascii performance on x86_64 with explicit SSE2 intrinsics

# Summary

Improves `slice::is_ascii` performance for SSE2 target roughly 1.5-2x on larger inputs.
AVX-512 keeps similiar performance characteristics.

This is building on the work already merged in rust-lang/rust#151259.
In particular this PR improves the default SSE2 performance, I don't consider this a temporary fix anymore.
Thanks to @folkertdev for pointing me to consider `as_chunk` again.

# The implementation:
- Uses 64-byte chunks with 4x 16-byte SSE2 loads OR'd together
- Extracts the MSB mask with a single `pmovmskb` instruction
- Falls back to usize-at-a-time SWAR for inputs < 64 bytes

# Performance impact (vs before rust-lang/rust#151259):
- AVX-512: 34-48x faster
- SSE2: 1.5-2x faster

  <details>
  <summary>Benchmark Results (click to expand)</summary>

  Benchmarked on AMD Ryzen 9 9950X (AVX-512 capable). Values show relative performance (1.00 = fastest).
  Tops out at 139GB/s for large inputs.

  ### early_non_ascii

  | Input Size | new_avx512 | new_sse2 | old_avx512 | old_sse2 |
  |------------|------------|----------|------------|----------|
  | 64 | 1.01 | **1.00** | 13.45 | 1.13 |
  | 1024 | 1.01 | **1.00** | 13.53 | 1.14 |
  | 65536 | 1.01 | **1.00** | 13.99 | 1.12 |
  | 1048576 | 1.02 | **1.00** | 13.29 | 1.12 |

  ### late_non_ascii

  | Input Size | new_avx512 | new_sse2 | old_avx512 | old_sse2 |
  |------------|------------|----------|------------|----------|
  | 64 | **1.00** | 1.01 | 13.37 | 1.13 |
  | 1024 | 1.10 | **1.00** | 42.42 | 1.95 |
  | 65536 | **1.00** | 1.06 | 42.22 | 1.73 |
  | 1048576 | **1.00** | 1.03 | 34.73 | 1.46 |

  ### pure_ascii

  | Input Size | new_avx512 | new_sse2 | old_avx512 | old_sse2 |
  |------------|------------|----------|------------|----------|
  | 4 | 1.03 | **1.00** | 1.75 | 1.32 |
  | 8 | **1.00** | 1.14 | 3.89 | 2.06 |
  | 16 | **1.00** | 1.04 | 1.13 | 1.62 |
  | 32 | 1.07 | 1.19 | 5.11 | **1.00** |
  | 64 | **1.00** | 1.13 | 13.32 | 1.57 |
  | 128 | **1.00** | 1.01 | 19.97 | 1.55 |
  | 256 | **1.00** | 1.02 | 27.77 | 1.61 |
  | 1024 | **1.00** | 1.02 | 41.34 | 1.84 |
  | 4096 | 1.02 | **1.00** | 45.61 | 1.98 |
  | 16384 | 1.01 | **1.00** | 48.67 | 2.04 |
  | 65536 | **1.00** | 1.03 | 43.86 | 1.77 |
  | 262144 | **1.00** | 1.06 | 41.44 | 1.79 |
  | 1048576 | 1.02 | **1.00** | 35.36 | 1.44 |

  </details>

## Reproduction / Test Projects

Standalone validation tools: https://github.com/bonega/is-ascii-fix-validation

- `bench/` - Criterion benchmarks for SSE2 vs AVX-512 comparison
- `fuzz/` - Compares old/new implementations with libfuzzer

Relates to: https://github.com/llvm/llvm-project/issues/176906
2026-01-26 14:36:21 +11:00
Trevor Gross
6c0ae93222 hint: Update the tracking issue for likely_unlikely
These were split from the `cold_path` tracking issue.
2026-01-25 20:34:12 -06:00
Trevor Gross
a694b502d4 hint: Document that cold_path can be used to implement (un)likely 2026-01-25 20:34:12 -06:00
bors
fb292b75fb Auto merge of #150353 - llogiq:rustc-hash-refactor, r=eholk
refactor rustc-hash integration

I found that rustc-hash is used in multiple compiler crates. Also some types use `FxBuildHasher` whereas others use `BuildHasherDefault<FxHasher>` (both do the same thing).

In order to simplify future hashing experiments, I changed every location to use `rustc_data_structures::fx::*` types instead, and also removed the `BuildHasherDefault` variant. This will simplify future experiments with hashing (for example trying out a hasher that doesn't implement `Default` for whatever reason).
2026-01-26 02:27:05 +00:00