| Age | Commit message (Collapse) | Author | Lines |
|
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`
|
|
|
|
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
|
|
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
|
|
|
|
|
|
|
|
r=GuillaumeGomez,notriddle
If a trait item appears in rustdoc search, hide the corrosponding impl items
fixes rust-lang/rust#138251
cc `@notriddle`
|
|
Move doc_cfg-specific code into `cfg.rs`
Follow-up of https://github.com/rust-lang/rust/pull/138907.
r? lolbinarycat
|
|
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`
|
|
Implement range support in `//@ edition`
First step to solve https://github.com/rust-lang/rust/issues/145364
|
|
make rust-analyzer use a dedicated build directory
inspired by https://github.com/rust-lang/rust/pull/132794
|
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
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
|
|
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)
|
|
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``
|
|
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.
|
|
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
|
|
Split Bound index into Canonical and Bound
See [#t-types/trait-system-refactor > perf `async-closures/post-mono-higher-ranked-hang.rs`](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
|
|
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)
|
|
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.
|
|
`rust-analyzer` subtree update
Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/a6bc4a4bbe6a65b71cbf76a0cf528c47a8d9f97f.
Created using https://github.com/rust-lang/josh-sync.
r? `@ghost`
|
|
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
|
|
|
|
Fix typo in 'unfulfilled_lint_expectation' to plural
|
|
[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
|
|
|
|
|
|
|
|
|
|
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.
|
|
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`
|
|
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
|
|
highlighter
|
|
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
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Don't condition RUSTDOC_LIBDIR on `--no-doc`
In d94e7ff065cd393a645eb3e9c96ce0418856e95d, `rustdoc_path` was changed to ignore `want_rustdoc` (which is just whether `--no-doc` was passed). But RUSTDOC_LIBDIR wasn't kept in sync. Rather than trying to keep `rustdoc_path` in sync with `RUSTDOC_LIBDIR`, just pass LIBDIR to the rustc shim unconditionally.
This fix allows calling `ensure(doc::Step)` from a non-doc top-level Step, even if `--no-doc` was present in the command line.
|
|
|
|
Oblarg/fix-negative-int-literals-in-macro-by-example
Fix negative integer literals in const generics in declarative macro context
|