Commit graph

166803 commits

Author SHA1 Message Date
bors
2cb4e7dce8 Auto merge of #147340 - matthiaskrgr:rollup-icymmsc, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#142670 (Document fully-qualified syntax in `as`' keyword doc)
 - rust-lang/rust#145685 (add CloneFromCell and Cell::get_cloned)
 - rust-lang/rust#146330 (Bump unicode_data and printables to version 17.0.0)
 - rust-lang/rust#146451 (Fix atan2 inaccuracy in documentation)
 - rust-lang/rust#146479 (add mem::conjure_zst)
 - rust-lang/rust#147117 (interpret `#[used]` as `#[used(compiler)]` on illumos)
 - rust-lang/rust#147190 (std: `sys::net` cleanups)
 - rust-lang/rust#147251 (Do not assert that a change in global cache only happens when concurrent)
 - rust-lang/rust#147280 (Return to needs-llvm-components being info-only)
 - rust-lang/rust#147315 (bless autodiff batching test)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-04 18:08:24 +00:00
Matthias Krüger
6c24eeeb62
Rollup merge of #147280 - workingjubilee:you-can-put-your-gcc-in-my-llvm-components, r=Kobzol
Return to needs-llvm-components being info-only

Partially revert a535042e80

Even with non-LLVM codegen backends, we want to allow for annotations that express dependencies to LLVM-specific parts of the test suite. This includes `//@ needs-llvm-components`, which just allows checking that LLVM is built with relevant target support before the test is run. It does not assert the test cannot work with another codegen backend.
2025-10-04 17:11:12 +02:00
Weihang Lo
b4578775b4
Update cargo submodule 2025-10-04 10:22:41 -04:00
bors
99b9a88503 Auto merge of #147323 - chenyukang:yukang-fix-tidy-check, r=jieyouxu
Fix top level ui tests check in tidy

I got an error when pushing code:

```console
fmt check
fmt: checked 6330 modified files
tidy check
tidy [ui_tests (tests)]: ui tests should be added under meaningful subdirectories: `/Users/yukang/rust/tests/ui/.DS_Store`
tidy [ui_tests (tests)]: FAIL
```

I think it's better to use `ignore::WalkBuilder` for checking the path.

r? `@jieyouxu`
2025-10-04 10:22:52 +00:00
yukang
422b91443f Fix top level ui tests check in tidy 2025-10-04 15:18:16 +08:00
bors
a0f398e89d Auto merge of #147308 - matthiaskrgr:rollup-ov04tbi, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#147245 (only replace the intended comma in pattern suggestions)
 - rust-lang/rust#147269 (Add regression test for 123953)
 - rust-lang/rust#147277 (Extract common logic for iterating over features)
 - rust-lang/rust#147292 (Respect `-Z` unstable options in `rustdoc --test`)
 - rust-lang/rust#147300 (Add xtensa arch to object file creation)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-04 06:19:58 +00:00
Matthias Krüger
dbc5e72ea2
Rollup merge of #147292 - Urgau:rustdoc-test-unstable_opts, r=fmease
Respect `-Z` unstable options in `rustdoc --test`

This PR makes rustdoc respect `-Z` unstable options when collecting doctests (`rustdoc --test`).

In the process I also realized that `--error-format` wasn't respected as well, making UI annotations impossible to write so I fixed that as well.

Best reviewed commit by commit.

Fixes https://github.com/rust-lang/rust/issues/147276
Fixes https://github.com/rust-lang/rust/issues/143930
r? fmease
2025-10-03 21:10:33 +02:00
Weihang Lo
e43a0b6bdb
Update cargo submodule 2025-10-03 11:58:30 -04:00
Urgau
e914a1a6e0 Respect --error-format in rustdoc --test 2025-10-03 17:04:17 +02:00
Urgau
3d5f54ad55 Respect -Z unstable options in rustdoc --test 2025-10-03 12:05:31 +02:00
bors
dd091003ac Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, r=GuillaumeGomez,notriddle
If a trait item appears in rustdoc search, hide the corrosponding impl items

fixes rust-lang/rust#138251

cc `@notriddle`
2025-10-03 08:43:43 +00:00
Stuart Cook
9e1b24d9e4
Rollup merge of #147270 - GuillaumeGomez:move-cfg-code, r=lolbinarycat
Move doc_cfg-specific code into `cfg.rs`

Follow-up of https://github.com/rust-lang/rust/pull/138907.

r? lolbinarycat
2025-10-03 09:16:29 +10:00
Stuart Cook
87c7946c8f
Rollup merge of #147268 - davidtwco:add-arm-maintainers-to-targets, r=lqd
add arm-maintainers to various targets

Add the ``@rust-lang/arm-maintainers`` team as maintainers to the following targets:

- `aarch64-unknown-linux-gnu`
- `aarch64-unknown-none`/`aarch64-unknown-none-softfloat`
- `aarch64-unknown-uefi`
- `armv7-unknown-linux-gnueabi`/`armv7-unknown-linux-gnueabihf`
- `armv7a-none-eabi`/`armv7a-none-eabihf`
- `armv7r-none-eabi`/`armv7r-none-abihf`
- `armv8r-none-eabihf`
- `thumbv7em-none-eabi`/`thumbv7em-none-eabihf`
- `thumbv7m-none-eabi`
- `thumbv8m.base-none-eabi`
- `thumbv8m.main-none-eabi`/`thumbv8m.main-none-eabihf`

cc `@thejpster`
2025-10-03 09:16:29 +10:00
Stuart Cook
6fe05b5162
Rollup merge of #146166 - ferrocene:pvdrz/edition-range, r=fmease,jieyouxu
Implement range support in `//@ edition`

First step to solve https://github.com/rust-lang/rust/issues/145364
2025-10-03 09:16:27 +10:00
Stuart Cook
a3291ede1a
Rollup merge of #141839 - tshepang:ease-lsp-use, r=Mark-Simulacrum,fee1-dead
make rust-analyzer use a dedicated build directory

inspired by https://github.com/rust-lang/rust/pull/132794
2025-10-03 09:16:26 +10:00
Jubilee Young
99550fbc3e Return to needs-llvm-components being info-only
Partially revert a535042e80

Even with non-LLVM codegen backends, we want to allow for annotations
that express dependencies to LLVM-specific parts of the test suite.
This includes `//@ needs-llvm-components`, which just allows checking
that LLVM is built with relevant target support before the test is run.
It does not assert the test cannot work with another codegen backend.
2025-10-02 14:39:18 -07:00
Michael Howell
c7d6857f75 rustdoc: use same stage for all pr check docs 2025-10-02 15:29:36 -05:00
binarycat
a145dfff03 search.js: introduce optimized removeIdxListAsc routine 2025-10-02 15:29:11 -05:00
binarycat
c407d340de if a trait item is shown in search results, hide the impl item
for example, if we're showing `Iterator::next`,
we don't need to also show `Range::next` in the results.

Co-authored-by: Michael Howell <michael@notriddle.com>
2025-10-02 15:27:40 -05:00
Christian Poveda
6631c8ef55
Document range syntax on the rustc dev guide 2025-10-02 11:13:22 -05:00
Pietro Albini
c61ec946d2
implement range support in //@ edition 2025-10-02 11:13:20 -05:00
David Wood
7715c0d648
add arm-maintainers to various targets 2025-10-02 15:42:05 +01:00
Guillaume Gomez
6275a19255 Move doc_cfg-specific code into cfg.rs 2025-10-02 15:24:04 +02:00
bors
94ecb52bbe Auto merge of #147261 - matthiaskrgr:rollup-yh3fgvc, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#146281 (Support `#[rustc_align_static]` inside `thread_local!`)
 - rust-lang/rust#146535 (mbe: Implement `unsafe` attribute rules)
 - rust-lang/rust#146585 (indexing: reword help)
 - rust-lang/rust#147004 (Tweak handling of "struct like start" where a struct isn't supported)
 - rust-lang/rust#147221 (Forbid `//@ compile-flags: -Cincremental=` in tests)
 - rust-lang/rust#147225 (Don't enable shared memory by default with Wasm atomics)
 - rust-lang/rust#147227 (implement `Box::take`)
 - rust-lang/rust#147233 (Initialize llvm submodule if not already the case to run citool)
 - rust-lang/rust#147236 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-02 11:14:37 +00:00
Matthias Krüger
2d1efe76bc
Rollup merge of #147236 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

1 commits in 33f1af40cc44dde7e3e892f7a508e6f427d2cbc6..1d7c3e6abec2d5a9bfac798b29b7855b95025426
2025-09-28 21:24:16 UTC to 2025-09-28 21:24:16 UTC

- Chunk of chapters from copyedit (rust-lang/book#4506)

## rust-lang/edition-guide

1 commits in aa6ce337c0adf7a63e33960d184270f2a45ab9ef..e2ed891f00361efc26616d82590b1c85d7a8920e
2025-10-01 17:11:54 UTC to 2025-10-01 17:11:54 UTC

- link to never type fallback lint as deny by default (rust-lang/edition-guide#377)

## rust-lang/nomicon

1 commits in f17a018b9989430967d1c58e9a12c51169abc744..23fc2682f8fcb887f77d0eaabba708809f834c11
2025-09-24 10:10:31 UTC to 2025-09-24 10:10:31 UTC

- a typo in ffi.md (rust-lang/nomicon#502)

## rust-lang/reference

13 commits in cc7247d8dfaef4c39000bb12c55c32ba5b5ba976..e11adf6016a362766eea5a3f9832e193994dd0c8
2025-09-29 00:55:42 UTC to 2025-09-23 23:33:32 UTC

- const functions: separate rule about users and rule about what is allowed in such functions (rust-lang/reference#2013)
- use "tuple enum variant" more consistently (rust-lang/reference#2015)
- Remove caveats related to `format_args!` expansion (rust-lang/reference#2017)
- RISC-V: Extension Updates (including document references) (rust-lang/reference#2002)
- Move inferred sentence to an example block (rust-lang/reference#2019)
- Add triagebot range-diff feature (rust-lang/reference#2011)
- use AND when searching for multiple terms (rust-lang/reference#2016)
- enumerations.md: fix pluralisation (rust-lang/reference#2014)
- const_eval.md: use sentence case for section title, for consistency (rust-lang/reference#2012)
- destructors.md: improve readability by adding pauses (rust-lang/reference#2007)
- RISC-V: Add vector state registers (rust-lang/reference#2005)
- destructors.md: point to core:: instead of std:: (rust-lang/reference#2006)
- Create Whitespace grammar productions (rust-lang/reference#1991)
2025-10-02 10:27:53 +02:00
Matthias Krüger
f4dcfa6ddb
Rollup merge of #147233 - GuillaumeGomez:citool-submodule-init, r=Kobzol
Initialize llvm submodule if not already the case to run citool

While working on https://github.com/rust-lang/rust/pull/146414, I ran the following command (to run CI docker locally):

```
cargo run --manifest-path src/ci/citool/Cargo.toml run-local --type pr x86_64-gnu-gcc
```

However, since I didn't have `src/llvm` submodule initialized, it failed. Apparently it's a common issue for people using this tool so this PR removes this small inconvenience.

r? ``@Kobzol``
2025-10-02 10:27:53 +02:00
Matthias Krüger
b78b1070e3
Rollup merge of #147221 - Zalathar:incremental, r=lqd
Forbid `//@ compile-flags: -Cincremental=` in tests

Tests should not try to manually enable incremental compilation with `-Cincremental`, because that typically results in stray directories being created in the repository root.

Also, if the incremental directory is not cleared, there is a risk of interference between successive runs of the same test.

Instead, use the `//@ incremental` directive, which instructs compiletest to handle the details of passing `-Cincremental` with a fresh directory.
2025-10-02 10:27:51 +02:00
Matthias Krüger
92aac1bdf6
Rollup merge of #146281 - Jules-Bertholet:static-align-thread-local, r=Mark-Simulacrum
Support `#[rustc_align_static]` inside `thread_local!`

Tracking issue: rust-lang/rust#146177

```rust
thread_local! {
    #[rustc_align_static(64)]
    static SO_ALIGNED: u64 = const { 0 };
}
```

This increases the amount of recursion the macro performs (once per attribute in addition to the previous once per item), making it easier to hit the recursion limit. I’ve added workarounds to limit the impact in the case of long doc comments, but this still needs a crater run just in case.

r? libs

``@rustbot`` label A-attributes A-macros A-thread-locals F-static_align T-libs
2025-10-02 10:27:48 +02:00
bors
4b9c62b4da Auto merge of #147138 - jackh726:split-canonical-bound, r=lcnr
Split Bound index into Canonical and Bound

See [#t-types/trait-system-refactor > perf &#96;async-closures/post-mono-higher-ranked-hang.rs&#96;](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/perf.20.60async-closures.2Fpost-mono-higher-ranked-hang.2Ers.60/with/541535613) for context

Things compile and tests pass, but not sure if this actually solves the perf issue (edit: it does). Opening up this to do a perf (and maybe crater) run.

r? lcnr
2025-10-02 08:09:33 +00:00
bors
42b384ec0d Auto merge of #147055 - beepster4096:subtype_is_not_a_projection, r=lcnr
Turn ProjectionElem::Subtype into CastKind::Subtype

I noticed that drop elaboration can't, in general, handle `ProjectionElem::SubType`. It creates a disjoint move path that overlaps with other move paths. (`Subslice` does too, and I'm working on a different PR to make that special case less fragile.) If its skipped and treated as the same move path as its parent then `MovePath.place` has multiple possible projections. (It would probably make sense to remove all `Subtype` projections for the canonical place but it doesn't make sense to have this special case for a problem that doesn't actually occur in real MIR.)

The only reason this doesn't break is that `Subtype` is always the sole projection of the local its applied to. For the same reason, it works fine as a `CastKind` so I figured that makes more sense than documenting and validating this hidden invariant.

cc rust-lang/rust#112651, rust-lang/rust#133258

r? Icnr (bc you've been the main person dealing with `Subtype` it looks like)
2025-10-02 01:54:48 +00:00
Zalathar
59c4dfe59d Forbid //@ compile-flags: -Cincremental= in tests
Tests should not try to manually enable incremental compilation with
`-Cincremental`, because that typically results in stray directories being
created in the repository root.

Instead, use the `//@ incremental` directive, which instructs compiletest to
handle the details of passing `-Cincremental` with a fresh directory.
2025-10-02 11:16:03 +10:00
bors
3369e82c6b Auto merge of #147210 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to a6bc4a4bbe.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-10-01 21:58:22 +00:00
bors
4da69dfff1 Auto merge of #147235 - matthiaskrgr:rollup-a0es1x9, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#146593 (Allow specifying multiple bounds for same associated item, except in trait objects)
 - rust-lang/rust#147177 ([DebugInfo] Fix MSVC tuple child creation)
 - rust-lang/rust#147195 (iter repeat: add tests for new count and last behavior)
 - rust-lang/rust#147202 (Swap order of `resolve_coroutine_interiors` and `handle_opaque_type_uses`)
 - rust-lang/rust#147204 (Refactor ArrayWindows to use a slice)
 - rust-lang/rust#147219 (Add proper error handling for closure in impl)
 - rust-lang/rust#147226 (include `outer_inclusive_binder` of pattern types)
 - rust-lang/rust#147230 (Fix typo in 'unfulfilled_lint_expectation' to plural)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-01 18:45:43 +00:00
rustbot
5991c8703d Update books 2025-10-01 19:14:45 +02:00
Matthias Krüger
de67301a28
Rollup merge of #147230 - demoray:patch-1, r=jdonszelmann
Fix typo in 'unfulfilled_lint_expectation' to plural
2025-10-01 18:42:39 +02:00
Matthias Krüger
e40e50ed49
Rollup merge of #147177 - Walnut356:tuples, r=Mark-Simulacrum
[DebugInfo] Fix MSVC tuple child creation

This is a fix for the debugger visualizer scripts

For whatever reason, using `CreateChildAtOffset` on the child element sometimes caused issues with pointers (and maybe some other types). The resulting child's memory would be a block 4 bytes too far forward. Creating the child off of the parent `valobj` and using the type definition to get the correct offset seems to fix that.

Before:

<img width="489" height="136" alt="image" src="https://github.com/user-attachments/assets/fb4cb95c-f199-49a6-8eba-6d3ff486b69a" />

After:

<img width="518" height="145" alt="image" src="https://github.com/user-attachments/assets/3f50dbc3-19ca-4fd8-87c5-b4be295f6e7c" />

This shouldn't affect any tests as we don't run debuginfo tests for MSVC afaik
2025-10-01 18:42:34 +02:00
Jules Bertholet
94f00f4e4a
Fix memory leak in os impl 2025-10-01 12:28:18 -04:00
Guillaume Gomez
4baf9208a1 Initialize llvm submodule if not already the case to run citool 2025-10-01 17:38:36 +02:00
Guillaume Gomez
69619535d9 Switch citool to 2024 edition 2025-10-01 17:36:53 +02:00
Brian Caswell
84864bcf89
Fix typo in 'unfulfilled_lint_expectation' to plural 2025-10-01 11:07:42 -04:00
Stuart Cook
62b72bd545
Rollup merge of #147189 - yotamofek:pr/rustdoc/highlight-optimizations-2, r=GuillaumeGomez
Replace `rustc_span::Span` with a stripped down version for librustdoc's highlighter

While profiling rustdoc's syntax highlighter, I noticed a lot of time being spent in the `Span` interner, due to the highlighter creating a lot of (new) spans.
Since the only data from the `Span` that we use is the `hi` and `lo` byte positions - I replaced the regular `Span` with a simple one with two fields, and in my benchmarks it seemed to make a big dent in the highlighter's perf, so thought I would see what the perf runner says.
2025-10-01 22:15:00 +10:00
Stuart Cook
ca8ed7eb80
Rollup merge of #147188 - Kobzol:remove-compiletest-stage-1, r=Zalathar,jieyouxu
Remove usage of `compiletest-use-stage0-libtest` from CI

It shouldn't be needed anymore after https://github.com/rust-lang/rust/pull/146929.

r? `@Zalathar`
2025-10-01 22:15:00 +10:00
Stuart Cook
3102f00f8d
Rollup merge of #147170 - Zalathar:directive, r=jieyouxu
compiletest: Pass around `DirectiveLine` instead of bare strings

This is an incremental step towards being able to clean up and centralize compiletest directive parsing.

My original plan was to add features to `DirectiveLine`, and then gradually migrate parsing code to use those features. However, that turned out to be impractical, because of how the existing directive parsers call each other. So instead this PR focuses on getting them to all take `DirectiveLine` instead of bare strings, to enable incremental work in the future.

Because this is part of an ongoing cleanup, I've prioritised clean diffs over nice code, because much of this code is going to be modified again when `DirectiveLine` is more capable.

r? jieyouxu
2025-10-01 22:14:58 +10:00
Yotam Ofek
2d03ab1486 Replace rustc_span::Span with a stripped down version for librustdoc's highlighter 2025-09-30 22:01:30 +03:00
Matthias Krüger
4cbaa70101
Rollup merge of #147172 - notriddle:tooldoc, r=Kobzol
bootstrap: build bootstrap docs with in-tree rustdoc

All of the docs need to be built with the same rustdoc. Otherwise, any change to the search index breaks everything, because the two rustdocs don't agree on the format.

Fixes https://github.com/rust-lang/rust/issues/147142
2025-09-30 20:46:46 +02:00
Yotam Ofek
6edf05b740 Add #[bench] for librustdoc's syntax highlighter 2025-09-30 21:13:45 +03:00
jackh726
d1bbd39c59 Split Bound into Canonical and Bound 2025-09-30 12:58:28 -04:00
Michael Howell
ba13b6ec6f bootstrap: build bootstrap docs with in-tree rustdoc
All of the docs need to be built with the same rustdoc. Otherwise,
any change to the search index breaks everything, because the two
rustdocs don't agree on the format.
2025-09-30 08:31:08 -07:00
Chayim Refael Friedman
bf6f75f98e Add regression test for another (long-standing) bug fixed by the new solver 2025-09-30 18:07:27 +03:00
Jakub Beránek
5f54d8bfd8
Remove usage of compiletest-use-stage0-libtest from CI 2025-09-30 16:08:48 +02:00