38582 Commits

Author SHA1 Message Date
bit-aloo
776dfd7abe
remove make from move_bound 2026-03-06 15:32:33 +05:30
bit-aloo
52511b7cb6
remove make from generate_fn_type_alias_from_new 2026-03-06 15:32:33 +05:30
bit-aloo
01b8ebc91b
remove make from generate_default_from_new 2026-03-06 15:32:33 +05:30
bit-aloo
a5b96fc81d
remove make from convert_bool_to_enum 2026-03-06 15:32:33 +05:30
bit-aloo
6feab700fc
remove make from add_turbo_fish 2026-03-06 15:32:33 +05:30
bit-aloo
2aeb269257
remove make from extract_type_alias 2026-03-06 15:32:33 +05:30
Laurențiu Nicola
0dc6097727
Merge pull request #21763 from lnicola/lockfile-beta
Tweak pre-release check for beta
2026-03-06 05:28:27 +00:00
Laurențiu Nicola
7e440b1d07 Tweak pre-release check for beta 2026-03-06 07:18:44 +02:00
Shoyu Vanilla (Flint)
a1c07fd2ee
Merge pull request #21760 from Shourya742/2026-03-06-fix-clippy
Fix clippy on master
2026-03-06 02:55:23 +00:00
bit-aloo
c45f41643a
fix clippy on master 2026-03-06 07:10:59 +05:30
Lukas Wirth
2a8f00fb93
Merge pull request #21660 from Wilfred/configure_codecov
internal: Configure codecov
2026-03-05 09:10:51 +00:00
Lukas Wirth
8f36fada93
Merge pull request #21732 from Wilfred/add_claude_rules
internal: Define rules for LLMs
2026-03-05 09:10:32 +00:00
Lukas Wirth
c12d719800
Merge pull request #21755 from oeb25/lsp-server-has-pending
feature: Add `has_pending` methods to `Incoming`/`Outgoing`/`ReqQueue` in `lsp_server`
2026-03-05 09:02:37 +00:00
Lukas Wirth
e8ee51ab9e
Merge pull request #21752 from ChayimFriedman2/question-mark-conversion
feat: When going to def on `?` on `Result` that goes through `From`, go to the `From` impl
2026-03-05 08:57:32 +00:00
oeb25
86c523fa50 Add has_pending methods to Incoming and Outgoing in lsp_server
Adds methods for checking if there's pending requests/responses in the
incoming/outgoing channels of `ReqQueue` in `lsp_server`.
2026-03-05 09:49:50 +01:00
Laurențiu Nicola
36169d1cc7
Merge pull request #21753 from rust-lang/rustc-pull
Rustc pull update
2026-03-05 06:52:08 +00:00
The rustc-josh-sync Cronjob Bot
048bfabd85 Merge ref 'f8704be04fe1' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@f8704be04f
Filtered ref: rust-lang/rust-analyzer@5ecd3ed8b0
Upstream diff: e7d90c695a...f8704be04f

This merge was created using https://github.com/rust-lang/josh-sync.
2026-03-05 04:37:29 +00:00
The rustc-josh-sync Cronjob Bot
ea3f645d95 Prepare for merging from rust-lang/rust
This updates the rust-version file to f8704be04fe1150527fc2cf21dd44327f0fe87fb.
2026-03-05 04:36:54 +00:00
Shoyu Vanilla (Flint)
87f5363056
Merge pull request #21750 from ChayimFriedman2/method-res-typingmode
fix: Do not use PostAnalysis TypingMode for IDE method resolution
2026-03-05 02:30:02 +00:00
bors
5ecd3ed8b0 Auto merge of #153416 - JonathanBrouwer:rollup-eezxWTV, r=JonathanBrouwer
Rollup of 12 pull requests



Successful merges:

 - rust-lang/rust#153402 (miri subtree update)
 - rust-lang/rust#152164 (Lint unused features)
 - rust-lang/rust#152801 (Refactor WriteBackendMethods a bit)
 - rust-lang/rust#153196 (Update path separators to be available in const context)
 - rust-lang/rust#153204 (Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors)
 - rust-lang/rust#153317 (Abort after `representability` errors)
 - rust-lang/rust#153276 (Remove `cycle_fatal` query modifier)
 - rust-lang/rust#153300 (Tweak some of our internal `#[rustc_*]` TEST attributes)
 - rust-lang/rust#153396 (use `minicore` in some `run-make` tests)
 - rust-lang/rust#153401 (Migrationg of `LintDiagnostic` - part 7)
 - rust-lang/rust#153406 (Remove a ping for myself)
 - rust-lang/rust#153414 (Rename translation -> formatting)
2026-03-05 00:14:57 +00:00
Chayim Refael Friedman
202fd31d0b When going to def on ? on Result that goes through From, go to the From impl
It's more useful to users than going to `Try::branch()` impl from `Result`, which is in std.
2026-03-05 01:25:35 +02:00
bors
0ba383e58e Auto merge of #151842 - eggyal:skip-deducing-parameter-attrs-during-ctfe, r=RalfJung
Do not deduce parameter attributes during CTFE

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/151842)*

Ever since rust-lang/rust#103172, `fn_abi_of_instance` might look at a function's body to deduce certain codegen optimization attributes for its indirectly-passed parameters beyond what can be determined purely from its signature (namely today `ArgAttribute::ReadOnly` and `ArgAttribute::CapturesNone`). Since rust-lang/rust#130201, looking at a function's body in this way entails generating, for any coroutine-closures, additional by-move MIR bodies (which aren't represented in the HIR)—but this requires knowing the types of their context and consequently cycles can ensue if such bodies are generated before typeck is complete (such as during CTFE).

Since they have no bearing on the evaluation result, this patch breaks a subquery out from `fn_abi_of_instance`, `fn_abi_of_instance_no_deduced_attrs`, which returns the ABI before such parameter attributes are deduced; and that new subquery is used in CTFE instead (however, since parameter attributes are only deduced in optimized builds, as a performance optimization we avoid calling the original query unless we are performing such a build).

Fixes rust-lang/rust#151748
Fixes rust-lang/rust#152497
2026-03-04 20:18:52 +00:00
Chayim Refael Friedman
398419b1e7 Do not use PostAnalysis TypingMode for IDE method resolution
As explained in the comments, PostAnalysis is good for most IDE things but not method resolution.

This fixes a bug which should not be impacted by this at all - return position impl trait in trait. It is currently lowered to an opaque, while it should be lowered to an anonymous associated type. But today when it is lowered as an opaque, this opaque of course has no definition and will normalize to an error, preventing method resolution on it from succeeding in some cases.
2026-03-04 22:06:36 +02:00
Jonathan Brouwer
c17b242c42
Rollup merge of #153414 - JonathanBrouwer:translate_cleanup, r=Kivooeo
Rename translation -> formatting

Because there is no translation happening anymore

r? @Kivooeo
2026-03-04 19:30:42 +01:00
Jonathan Brouwer
aa84ba09e2
Rollup merge of #153406 - jieyouxu:adjust-notifs, r=jieyouxu
Remove a ping for myself

To improve the SNR for my notifs.
r? ghost
2026-03-04 19:30:41 +01:00
Jonathan Brouwer
89d86aff5c
Rollup merge of #153401 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer
Migrationg of `LintDiagnostic` - part 7

Part of https://github.com/rust-lang/rust/issues/153099.

This PR removes the `LintDiagnostic` trait and proc-macro. \o/

r? @JonathanBrouwer
2026-03-04 19:30:40 +01:00
Jonathan Brouwer
b44e8cbfde
Rollup merge of #153396 - folkertdev:run-make-minicore, r=jieyouxu
use `minicore` in some `run-make` tests

r? jieyouxu

This manually builds `minicore` in two more `rmake` tests that rolled their own before, and adds a helper for the path of the minicore source. I tried adding a true minicore helper in `run_make_support` but unfortunately the minicore build needs to inherit some (but probably not all) arguments of the final rustc invocation (notably `target` and `target_cpu`), so a one-size-fits-all helper doesn't really work as far as I can see.

For now with 3 uses this is probably fine, but there are probably other `run-make` tests that could use `minicore` but didn't document/simulate that.

follow-up to discussion in https://github.com/rust-lang/rust/pull/153153.
2026-03-04 19:30:40 +01:00
Jonathan Brouwer
0bee9c2d97
Rollup merge of #153300 - fmease:test-attrs-tweaks, r=JonathanBrouwer
Tweak some of our internal `#[rustc_*]` TEST attributes

I think I might be the one who's used the internal TEST attrs `#[rustc_{dump_predicates,object_lifetime_default,outlives,variance}]` the most in recent times, I might even be the only one. As such I've noticed some recent-ish issues that haven't been fixed so far and which keep bothering me. Moreover I have a longstanding urge to rename several of these attributes which I couldn't contain anymore.

[`#[rustc_*]` TEST attributes](https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#rustc_-test-attributes) are internal attributes that basically allow you to dump the output of specific queries for use in UI tests or for debugging purposes.

1. When some of these attributes were ported over to the new parsing API, their targets were unnecessarily restricted. I've kept encountering these incorrect "attribute cannot be used" errors all the while HIR analysis happily & correctly dumped the requested data below it. I've now relaxed their targets.
2. Since we now have target checking for the internal attributes I figured that it's unhelpful if we still intentionally crashed on invalid targets, so I've got rid of that.
3. I've always been annoyed that most of these (very old) attributes don't contain the word `dump` in their name (rendering their purpose non-obvious) and that some of their names diverge quite a bit from the corresponding query name. I've now rectified that. The new names take longer to type but it's still absolutely acceptable imo.

---

I haven't renamed all of the TEST attributes to follow the `rustc_dump_` scheme since that's quite tedious. If it's okay with you I'd like to postpone that (e.g., `rustc_{def_path,hidden_type…,layout,regions,symbol_name}`).

I've noticed that the parsers for TEST attrs are spread across `rustc_dump.rs`, `rustc_internal.rs` & `test_attrs.rs` which is a bit confusing. Since the new names are prefixed with `rustc_dump_` I've moved their parsers into `rustc_dump.rs` but of course they are still TEST attrs. IIRC, `test_attrs.rs` also contains non-`rustc_`-TEST attrs, so we can't just merge these two files. I guess that'll sort itself out in the future when I tackle the other internal TEST attrs.

r\? Jana || Jonathan
2026-03-04 19:30:39 +01:00
Jonathan Brouwer
b4170baced
Rollup merge of #153276 - Zoxc:rem-fatal-cycle, r=nnethercote
Remove `cycle_fatal` query modifier

This removes the `cycle_fatal` query modifier as it has no effect on its current users.

The default `CycleErrorHandling::Error` mode does the same as `cycle_fatal` when the default impl of `FromCycleError` is used. The return types of queries using `cycle_fatal` however have no specialized `FromCycleError` impl.
2026-03-04 19:30:38 +01:00
Jonathan Brouwer
2c1b20edab
Rollup merge of #153317 - nnethercote:abort-after-infinite-errors, r=oli-obk
Abort after `representability` errors

Doing so results in better error messages and makes the code a bit simpler. Details in individual commits.

r? @oli-obk
2026-03-04 19:30:38 +01:00
Jonathan Brouwer
d48dff9b2d
Rollup merge of #153204 - xtqqczze:must-use-map, r=Amanieu,joboet
Add `#[must_use]` attribute to `HashMap` and `HashSet` constructors

- `new_in`
- `with_capacity_and_hasher`
- `with_capacity_and_hasher_in`
- `with_hasher`
- `with_hasher_in`

See also: https://github.com/rust-lang/rust/issues/89692
2026-03-04 19:30:37 +01:00
Jonathan Brouwer
932f27f953
Rollup merge of #153196 - MikkelPaulson:const-path-separators, r=joboet
Update path separators to be available in const context

Tracking issue: rust-lang/rust#153106

This makes platform-dependent secondary path separators available in const context (ie. at compile time). The platform definitions have also been consolidated behind a common macro to prevent transcription errors, whereas previously they were defined 3-4 times per platform.

### Questions

I've manually verified that this compiles against each platform. It seems like no unit tests should be required for this change; is that correct?
2026-03-04 19:30:37 +01:00
Jonathan Brouwer
2ba6fd9f01
Rollup merge of #152801 - bjorn3:lto_refactors14, r=jackh726
Refactor WriteBackendMethods a bit
2026-03-04 19:30:36 +01:00
Jonathan Brouwer
403297d33a
Rollup merge of #152164 - mu001999-contrib:lint/unused_features, r=JonathanBrouwer
Lint unused features

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152164)*

Fixes rust-lang/rust#44232
Fixes rust-lang/rust#151752

---

This PR records used features through query side effect, then reports unsued features finally.
2026-03-04 19:30:36 +01:00
Shoyu Vanilla (Flint)
789ad51109
Merge pull request #21747 from ChayimFriedman2/never-upd-syn
fix: Allow never coercions in struct update syntax
2026-03-04 16:08:04 +00:00
Chayim Refael Friedman
1a6d91ea8f Allow never coercions in struct update syntax 2026-03-04 17:57:39 +02:00
Lukas Wirth
e8b19c9a93
Merge pull request #21745 from ChayimFriedman2/assoc-type-fixup
fix: Fix a bug in associated type lowering
2026-03-04 13:39:33 +00:00
Laurențiu Nicola
665fec5b2b
Merge pull request #21746 from lnicola/triagebot-issue-links
minor: Only complain about uncanonicalized issue links
2026-03-04 11:58:24 +00:00
Laurențiu Nicola
957865b69a Only complain about uncanonicalized issue links 2026-03-04 13:49:32 +02:00
Chayim Refael Friedman
022f93973a
Merge pull request #21671 from A4-Tacks/postfix-tree-climbing
fix: offer block `.let` in ref-expr in match arm
2026-03-04 08:10:24 +00:00
Chayim Refael Friedman
bfa88ee8b2 Fix a bug in associated type lowering
When rewriting assoc type shorthand lowering (`TypeParam::AssocType`), I took into account that if two traits have the same assoc type, even if one is a supertrait of the other, it's an error. However it turns out that assoc type predicates (`Trait<AssocType = Foo>`) uses the same infrastructure, and there it's allowed to specify an ambiguous assoc type when it refers to a sub-trait. So make a distinction between ambiguous assoc type that comes from a supertrait and one that does not, and if it comes from a supertrait, keep the resolved assoc type for cases that need it.
2026-03-04 09:24:16 +02:00
Chayim Refael Friedman
04967346d0
Merge pull request #21743 from ChayimFriedman2/bump-smol-str
minor: Release a new smol-str minor version with borsh fix
2026-03-04 06:40:02 +00:00
Chayim Refael Friedman
6f4aea11ba Release a new smol-str minor version with borsh fix 2026-03-04 08:30:26 +02:00
Chayim Refael Friedman
09fe22e4d9
Merge pull request #21687 from A4-Tacks/destruct-self-param
feat: offer destructure_struct_binding on self param
2026-03-04 05:05:22 +00:00
Chayim Refael Friedman
eb8d10e0bf
Merge pull request #21719 from A4-Tacks/make-block-newline
fix: Improve newline for make `match`, `if`, `while` etc
2026-03-04 04:58:28 +00:00
Chayim Refael Friedman
86a5201c36
Merge pull request #21726 from Albab-Hasan/fix/next-solver-is-rust
Fix: align `is_rust()` with rustc by correcting constructor ABI in next solver
2026-03-04 04:55:46 +00:00
Chayim Refael Friedman
a105c172b9
Merge pull request #21728 from A4-Tacks/add-match-arms-descend-range
fix: Fix wrong descend range for add_missing_match_arms
2026-03-04 04:54:07 +00:00
mu001999
bcb0e2207a Remove unused features in tools 2026-03-04 08:06:36 +08:00
bors
4a58b1e7e8 Auto merge of #153344 - JonathanBrouwer:rollup-uL4XlqI, r=JonathanBrouwer
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#153336 (stdarch subtree update)
 - rust-lang/rust#152943 (Parse `impl` restrictions)
 - rust-lang/rust#153184 (Replace CodegenResults with CompiledModules)
 - rust-lang/rust#153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR)
 - rust-lang/rust#153319 (Comments and docs: add missing periods to "ie.")
 - rust-lang/rust#153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
2026-03-03 12:09:37 +00:00
Jonathan Brouwer
723eb8125e
Rollup merge of #153326 - Zalathar:query-modifiers, r=nnethercote
Make `rustc_with_all_queries!` pass query modifiers as named values

This PR is a bold overhaul of how the proc-macro in `rustc_macros::query` passes query modifiers to the callback macros in `rustc_middle` and `rustc_query_impl`.

The existing approach passes modifiers as a list that looks like `[(arena_cache), (no_hash)]`. That style requires a family of helper macros (`if_arena_cache!`, `if_no_hash!`) to check for modifiers when consuming the query list.

This PR changes the proc-macro to instead pass modifiers like this:

```text
{
    anon: false,
    arena_cache: true,
    cache_on_disk: false,
    ...
}
```

This style allows each of the callback macros to deconstruct the modifier list in a relatively straightforward way, by binding the true/false literals to variables like `$arena_cache:literal`.

One of the big advantages of this style is that we can write things like `#[cfg($arena_cache)]` and `#[cfg(not($arena_cache))]` to select blocks of code, eliminating the need for the `if_arena_cache!` family of helper macros.

In follow-up PRs, we can also try to take advantage of the new modifier style to pass richer information for some modifiers, such as `desc` or `cache_on_disk_if`. That could potentially make it more reasonable to get rid of the `_description_fns` and `_cache_on_disk_if_fns` modules, as proposed in https://github.com/rust-lang/rust/pull/153065.

r? nnethercote
2026-03-03 13:08:46 +01:00