Commit graph

167390 commits

Author SHA1 Message Date
Stuart Cook
21a1573742
Rollup merge of #148186 - notriddle:test-cci, r=GuillaumeGomez,jieyouxu
rustdoc-search: add an integration test for CCI

Part of https://github.com/rust-lang/rust/issues/130676
2025-10-28 20:39:41 +11:00
Stuart Cook
ff7909bc21
Rollup merge of #148175 - osamakader:fix-typos-duplicate-words, r=lcnr
Fix typos: duplicate words in comments

- Fix 'the the' → 'the' in rustc_const_eval
- Fix 'wether' → 'whether' in compiletest
- Fix 'is is' → 'is' in rustc_ast_pretty (2 instances)
2025-10-28 20:39:40 +11:00
Stuart Cook
86161675ea
Rollup merge of #148172 - tshepang:rdg-sync, r=tshepang
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to b9fb8e9708.

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

r? ```@ghost```
2025-10-28 20:39:40 +11:00
Stuart Cook
d02848e1a4
Rollup merge of #148158 - heiher:loong64-medium, r=jieyouxu
ci: loongarch64: use medium code model to avoid relocation overflows

The LoongArch C/C++ cross toolchain defaults to the `normal` code model, which can cause relocation overflows when linking LLVM after upgrading to verion 22. This change uses the `medium`code model for `loongarch64-linux-gnu` and `loongarch64-linux-musl` builds to avoid these linking errors.
2025-10-28 20:39:38 +11:00
Stuart Cook
a383fe8f20
Rollup merge of #148139 - Urgau:add-coverage-scope, r=Zalathar
Add `coverage` scope for controlling paths in code coverage

This PR adds a `coverage` scope (for `-Zremap-path-scope`) for controlling if the paths that ends up in code coverage output should be remapped or not.

Currently code coverage use the `macro` scope which is not a appropriate scope for them.

Found during the stabilization of `-Zremap-path-scope` https://github.com/rust-lang/rust/pull/147611#issuecomment-3396210043 and was asked to be in a separate PR in https://github.com/rust-lang/rust/pull/147611#issuecomment-3448455252.

r? compiler
2025-10-28 20:39:37 +11:00
Stuart Cook
bfa7219a3a
Rollup merge of #148044 - jyn514:compiletest-logging, r=Zalathar
compiletest: show output in debug logging

I had a test I was confused by; the root issue is that `error-pattern` runs before normalization, even though `//~ ERROR` runs after normalization. This logging caught the issue immediately.
2025-10-28 20:39:36 +11:00
Stuart Cook
b770888039
Rollup merge of #147915 - pirama-arumuga-nainar:patch-1, r=lqd
Update target maintainers android.md
2025-10-28 20:39:34 +11:00
pirama-arumuga-nainar
610b82ef0c Update target maintainers android.md 2025-10-27 17:04:42 -07:00
Michael Howell
978fd435ae rustdoc-search: add an integration test for CCI
Part of https://github.com/rust-lang/rust/issues/130676
2025-10-27 11:57:32 -07:00
Osama Abdelkader
bf6f3035af Fix typos: duplicate words in comments
- Fix 'the the' → 'the' in rustc_const_eval
- Fix 'wether' → 'whether' in compiletest
- Fix 'is is' → 'is' in rustc_ast_pretty (2 instances)

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
2025-10-27 18:01:04 +03:00
Tshepang Mbambo
044bc7a09d
Merge pull request #2617 from rust-lang/rustc-pull
Rustc pull update
2025-10-27 15:42:42 +02:00
Tshepang Mbambo
58d2f0317d
Merge pull request #2583 from rust-lang/tshepang-patch-4
remove untrue/contentious statement
2025-10-27 15:39:14 +02:00
Tshepang Mbambo
943074fd09 improve and strengthen wording 2025-10-27 15:35:18 +02:00
Urgau
94c893ee2e Add coverage scope for controlling paths in code coverage 2025-10-27 12:54:24 +01:00
bors
34a8c7368c Auto merge of #148163 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to 049767e6fa.

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

r? `@ghost`
2025-10-27 07:56:13 +00:00
The rustc-josh-sync Cronjob Bot
e88afc0809 Merge ref 'b1b464d6f6' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: b1b464d6f6
Filtered ref: f94cd4e7de0695f11c7f0bf0d33bb39ce736c581
Upstream diff: 4068bafedd...b1b464d6f6

This merge was created using https://github.com/rust-lang/josh-sync.
2025-10-27 04:15:05 +00:00
The rustc-josh-sync Cronjob Bot
b12f71178b Prepare for merging from rust-lang/rust
This updates the rust-version file to b1b464d6f6.
2025-10-27 04:14:59 +00:00
bors
23fced0fcc Auto merge of #146069 - camsteffen:range-desugar-span, r=SparrowLii
Mark desugared range expression spans with DesugaringKind::RangeExpr

This is a prerequisite to removing `QPath::LangItem` (rust-lang/rust#115178) because otherwise there would be no way to detect a range expression in the HIR.

There are some non-obvious Clippy changes so a Clippy team review would be good.
2025-10-27 02:50:35 +00:00
WANG Rui
87c66c93ca ci: loongarch64: use medium code model to avoid relocation overflows
The LoongArch C/C++ cross toolchain defaults to the `normal` code model, which
can cause relocation overflows when linking LLVM after upgrading to verion 22.
This change uses the `medium`code model for `loongarch64-linux-gnu` and
`loongarch64-linux-musl` builds to avoid these linking errors.
2025-10-27 09:44:16 +08:00
Chayim Refael Friedman
f7c1ad66cb
Merge pull request #20914 from ShoyuVanilla/next-solver-tests
Add regression tests for some fixed `A-ty` issues
2025-10-26 17:41:19 +00:00
bors
f977dfc388 Auto merge of #146992 - GuillaumeGomez:improve-highlight, r=yotamofek,lolbinarycat
Improve source code for `highlight.rs`

I was very bothered by the complexity of this file, in particular the handling of `pending_elems` which was very tricky to follow.

So instead, here comes a more sane approach: the content is store in a stack-like type which handles "levels" of HTML (ie, a macro expansion can contain other HTML tags which can themselves contain other, etc). Making it much simpler to keep track of what's going on.

r? `@lolbinarycat`
2025-10-26 17:31:22 +00:00
Shoyu Vanilla
85b7d646cd Add regression tests for some fixed A-ty issues 2025-10-27 02:18:52 +09:00
Shoyu Vanilla (Flint)
f62cb389c4
Merge pull request #20913 from A4-Tacks/if-let-chain-for-is-method-with-if-let
Fix not applicable on let-chain for replace_is_method_with_if_let_method
2025-10-26 14:48:02 +00:00
bors
2888098522 Auto merge of #148003 - aDotInTheVoid:rustdoc-postcard-compiletest-groundwork, r=jieyouxu
compiletest: pass rustdoc mode as param, rather than implicitly

Spun out of https://github.com/rust-lang/rust/pull/142642

In the future, I want the rustdoc-json test suite to invoke rustdoc twice, once with `--output-format=json`, and once with the (not yet implemented) `--output-format=postcard` flag.

Doing that requires being able to explicitly tell the `.document()` function which format to use, rather then implicitly using json in the rustdoc-json suite, and HTML in all others.

r? `@jieyouxu`

CC `@jalil-salame`
2025-10-26 14:24:14 +00:00
Lukas Wirth
165065ae1e
Merge pull request #20837 from osdyne/extension-configuration
Add an Extension Config API
2025-10-26 12:34:05 +00:00
Michael Gruenewald
ce94044ff9 Don't add cargo to requiresServerReloadOpts 2025-10-26 13:22:52 +01:00
A4-Tacks
95e2b8444a
Fix not applicable on let-chain for replace_is_method_with_if_let_method
Example
---
```rust
fn main() {
    let x = Some(1);
    let cond = true;
    if cond && x.is_som$0e() {}
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn main() {
    let x = Some(1);
    let cond = true;
    if cond && let Some(${0:x1}) = x {}
}
```
2025-10-26 19:55:09 +08:00
许杰友 Jieyou Xu (Joe)
ee978d240a
Merge pull request #2615 from rust-lang/tshepang-patch-2 2025-10-26 19:34:51 +08:00
George Tokmaji
e873f13454 Add myself as a windows-msvc maintainer 2025-10-26 10:58:04 +01:00
Lukas Wirth
3145078e66
Merge pull request #19918 from A4-Tacks/remove-else-branches
Add ide-assist: remove else branches
2025-10-26 08:35:08 +00:00
Lukas Wirth
64326b2d6a
Merge pull request #20589 from A4-Tacks/extract-mod-not-in-impl
Fix extract multiple item in impl for extract_module
2025-10-26 08:25:00 +00:00
Lukas Wirth
dbfbe8f742
Merge pull request #20712 from A4-Tacks/destruct-tuple-shorthand
Fix shorthand field pat for destructure_tuple_binding
2025-10-26 08:18:40 +00:00
Lukas Wirth
10066b373b
Merge pull request #20705 from A4-Tacks/flip-range
Add ide-assist: flip_range_expr
2025-10-26 08:17:15 +00:00
Lukas Wirth
6c18a87141
Merge pull request #20764 from A4-Tacks/fix-guarded-rhs-let-else
Fix let-expr in lhs for convert_to_guarded_return
2025-10-26 08:06:08 +00:00
Lukas Wirth
9c7db53595
Merge pull request #20912 from A4-Tacks/left-side-in-cond
Fix not complete `let` before expr in condition
2025-10-26 07:19:04 +00:00
bors
34f954f9b7 Auto merge of #148100 - matthiaskrgr:rollup-vrd4wy8, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#143361 (Stop passing resolver disambiguator state to AST lowering.)
 - rust-lang/rust#148000 (Improvements to attribute suggestions)
 - rust-lang/rust#148007 (chore: Update to the latest annotate-snippets)
 - rust-lang/rust#148088 (compiletest: Simplify passing arguments to spawned test threads)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-25 19:10:39 +00:00
Chayim Refael Friedman
ad63c71652
Merge pull request #20759 from A4-Tacks/strongly-typed-conv-to-guarded
Fix untyped syntax tree ans casts for convert_to_guarded_return
2025-10-25 17:14:53 +00:00
Matthias Krüger
d4f0f3537a
Rollup merge of #148088 - Zalathar:test-thread, r=jieyouxu
compiletest: Simplify passing arguments to spawned test threads

The current code structure was heavily influenced by wanting to match the libtest executor as closely as possible.

Now that the libtest executor has been removed, we can get rid of some complexity that no longer serves a purpose in the new executor.

---

The renaming of `ShouldPanic` is only semi-related, but I included it here because it's small, and as a separate PR it would have conflicted with this one.

r? jieyouxu
2025-10-25 12:57:40 +02:00
bors
04ff05c9c0 Auto merge of #148090 - jhpratt:rollup-n260hcy, r=jhpratt
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#147406 (Remove needs-asm-support directive in tests with explicit targets)
 - rust-lang/rust#148056 (refactor(rustdoc): Remove redundant langstr checks)
 - rust-lang/rust#148065 (compiletest: Add concrete examples for some config/test path fields)
 - rust-lang/rust#148072 (Fix compiling `CondVar::wait_timeout` on 32-bit Apple platforms)
 - rust-lang/rust#148073 (test(frontmatter): Rename tests to make coverage more obvious)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-25 07:52:52 +00:00
A4-Tacks
5fda166acf
Fix not complete let before expr in condition
Example
---
```rust
fn f() {
    if $0foo.bar() {}
}
```

**Before this PR**

"let" not in completion list

**After this PR**

```rust
fn f() {
    if let $1 = $0foo.bar() {}
}
```
2025-10-25 15:24:37 +08:00
A4-Tacks
e0fd5743f9
Fix untyped syntax tree ans casts for convert_to_guarded_return 2025-10-25 13:16:57 +08:00
Jacob Pratt
0b7fbc5358
Rollup merge of #148065 - Zalathar:test-paths, r=jieyouxu
compiletest: Add concrete examples for some config/test path fields

Seeing a specific example path can be much more enlightening than trying to figure out what the prose is gesturing towards.

Also, in some cases the existing comments were incorrect or misleading, as demonstrated by the example paths.

The example paths were determined by dumping them directly out of the config with `dbg!`, and then lightly anonymizing them for example purposes.

---

No functional changes.

r? jieyouxu
2025-10-25 00:40:36 -04:00
Jacob Pratt
db5b48762f
Rollup merge of #148056 - epage:merged, r=GuillaumeGomez
refactor(rustdoc): Remove redundant langstr checks

These same checks feed into `doctest.can_be_merged`, making them redundant.
2025-10-25 00:40:36 -04:00
Jacob Pratt
c9522e2889
Rollup merge of #147406 - jchecahi:remove-needs-asm-support-explicit, r=cuviper
Remove needs-asm-support directive in tests with explicit targets

The `needs-asm-support` directive checks whether the host architecture supports inline assembly, not the target architecture. For tests that explicitly specify a target via `--target` in their compile-flags, this directive is incorrect and unnecessary.

These tests are cross-compiling to specific targets (like x86_64, arm, aarch64, riscv, etc.) that are already known to have stable asm support. The directive was causing these tests to be incorrectly skipped on hosts that don't support asm, even though the target does.

Tests with explicit targets should rely on `needs-llvm-components` to ensure the appropriate backend is available, rather than checking host asm support.
2025-10-25 00:40:35 -04:00
Zalathar
bb20367178 Rename ShouldPanic to ShouldFail
The old name was a holdover from libtest, but in compiletest we only use it for
`//@ should-fail` tests, which are tests of compiletest itself.
2025-10-25 13:50:55 +11:00
Zalathar
665dbb3739 Move all other test thread args into TestThreadArgs 2025-10-25 13:20:44 +11:00
Zalathar
f988679d23 Rename RunnableTest to TestThreadArgs and inline its methods 2025-10-25 13:20:39 +11:00
Zalathar
2db19f27da Don't pass Arc<Config> to runtest::run
This function doesn't need its own clone of the `Arc`, and can just take a
reference instead.
2025-10-25 12:51:30 +11:00
yukang
2ab3580300 Use tracing error when received compiler message for unknown package 2025-10-25 09:14:35 +08:00
Zalathar
2a8416146b Add concrete examples for several config paths 2025-10-25 10:46:07 +11:00