Commit graph

315756 commits

Author SHA1 Message Date
Lukas Wirth
fd80a3eded
Merge pull request #21490 from ChayimFriedman2/expand-derive-builtin
fix: Do not mix the order of builtin/regular derives in "Expand macro recursively"
2026-01-21 09:53:00 +00:00
Shoyu Vanilla (Flint)
c177a39da0
Merge pull request #21497 from ileixe/issue-21315
feat(hir-ty): add method references_only_ty_error to detect type errors
2026-01-20 16:56:13 +00:00
Youseok Yang
e07da1fb86 feat(hir-ty): add method references_only_ty_error to detect type errors
Add a new method `references_only_ty_error` to the `Ty` implementation
to determine if a type contains only type errors, ignoring const and
lifetime errors. Enhance test suite for const generic method resolution.
2026-01-20 12:42:00 +00:00
Shoyu Vanilla (Flint)
92903fa647
Merge pull request #21485 from A4-Tacks/move-guard-clean-block
Improve move_guard redundanted block
2026-01-20 06:14:13 +00:00
Shoyu Vanilla (Flint)
dbee105769
Merge pull request #21492 from ChayimFriedman2/async-fn
fix: Ensure correct capturing of async fn params even when they use weird patterns
2026-01-20 06:12:50 +00:00
Shoyu Vanilla (Flint)
ab0853ba3c
Merge pull request #21491 from ChayimFriedman2/static-insert-var
fix: Insert type vars and normalize for the type of a used `static`
2026-01-19 09:54:43 +00:00
Chayim Refael Friedman
a894e850c6
Merge pull request #21493 from ChayimFriedman2/perf-fixup
minor: Cache `Clauses::empty()`
2026-01-19 08:07:23 +00:00
Chayim Refael Friedman
29aad0493b Cache Clauses::empty() 2026-01-19 09:58:15 +02:00
Laurențiu Nicola
ad7d5ea2fd
Merge pull request #21385 from Shourya742/2026-01-01-parallelize-proc-macro-expansion
internal: Parallelize proc macro expansion
2026-01-19 06:07:56 +00:00
Chayim Refael Friedman
1285b1b13c Ensure correct capturing of async fn params even when they use weird patterns
rustc does the same.
2026-01-19 07:14:48 +02:00
Chayim Refael Friedman
4dad9b9081 Insert type vars and normalize for the type of a used static
They have their own special path, so they slipped through.
2026-01-19 05:21:54 +02:00
Chayim Refael Friedman
ebcbff2a2e Do not mix the order of builtin/regular derives in "Expand macro recursively" 2026-01-19 04:50:23 +02:00
Lukas Wirth
7bbe9029fb
Merge pull request #21484 from Veykril/push-uoxwkwottnqn
fix: Do not show sysroot dependencies in symbol search
2026-01-18 09:02:34 +00:00
Lukas Wirth
8f129586bf
Merge pull request #21483 from Veykril/push-vswqqvzqyvnv
feat: Trigger flycheck if non-workspace files get modified
2026-01-18 09:02:14 +00:00
Lukas Wirth
bfbee86a2d feat: Trigger flycheck if non-workspace files get modified
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-01-18 09:53:53 +01:00
Lukas Wirth
cbad6dd117 fix: Do not show sysroot dependencies in symbol search 2026-01-18 09:53:09 +01:00
Laurențiu Nicola
060c6f1691
Merge pull request #21468 from Wilfred/improve_discover_docs
internal: Improve docs for discoverConfig
2026-01-18 07:30:36 +00:00
A4-Tacks
c31698b695
Improve move_guard redundanted block
Example
---
```rust
fn main() {
    match 92 {
        x $0if x > 10 => {
            let _ = true;
            false
        },
        _ => true
    }
}
```

**Before this PR**

```rust
fn main() {
    match 92 {
        x => if x > 10 {
            {
                let _ = true;
                false
            }
        },
        _ => true
    }
}
```

**After this PR**

```rust
fn main() {
    match 92 {
        x => if x > 10 {
            let _ = true;
            false
        },
        _ => true
    }
}
```
2026-01-17 20:20:15 +08:00
bit-aloo
8da5de0ca0
rebased changes 2026-01-16 22:34:49 +05:30
bit-aloo
a81da31f40
rename from proc_macro_processes to procMacro_processes 2026-01-16 22:31:03 +05:30
bit-aloo
b49417eea9
fix test and update some autogen files 2026-01-16 22:31:03 +05:30
bit-aloo
0587cbdd6f
optimize pick_process to short circuit and return as early as possible if a valid process is found 2026-01-16 22:31:03 +05:30
bit-aloo
721361f289
update all cli workflows 2026-01-16 22:31:03 +05:30
bit-aloo
9d5e60005a
add proc_macro_processes in load config 2026-01-16 22:31:03 +05:30
bit-aloo
96ecd1773c
add num process in config 2026-01-16 22:31:03 +05:30
bit-aloo
e3e7c29054
remove default pool size from pool 2026-01-16 22:31:03 +05:30
bit-aloo
263015a4a4
remove expand from pool 2026-01-16 22:31:03 +05:30
bit-aloo
0936597b3e
add version to pool 2026-01-16 22:31:03 +05:30
bit-aloo
09c91b79a8
pick workers which have not exited 2026-01-16 22:31:03 +05:30
bit-aloo
66bca6a252
propagate error from load dylibs 2026-01-16 22:31:03 +05:30
bit-aloo
c8a3551bd1
change callback from FnMut to Fn as we only transform messages and not really change change state 2026-01-16 22:31:03 +05:30
bit-aloo
c4c336ad7c
keep it clean and tidy 2026-01-16 22:31:03 +05:30
bit-aloo
922bc7e4d4
rename process to pool in ProcMacro struct 2026-01-16 22:31:03 +05:30
bit-aloo
82e758acc1
add better process picker and improve loading dylib 2026-01-16 22:31:03 +05:30
bit-aloo
c685aa9123
direct client calls via pool 2026-01-16 22:31:01 +05:30
bit-aloo
9fb5d34626
add pool of processes 2026-01-16 22:30:40 +05:30
bit-aloo
98d4496a1e
add termination flag to procmacroserverprocess 2026-01-16 22:29:40 +05:30
bit-aloo
4870a5fb69
add worker abstraction 2026-01-16 22:29:19 +05:30
Shoyu Vanilla (Flint)
c6ec8ea033
Merge pull request #21475 from lukasoyen/fix-flycheck-indexing
fix: lookup flycheck by ID instead of vector index
2026-01-16 07:29:24 +00:00
lummax
d859656349 fix: lookup flycheck by ID instead of vector index
After a recent introduction of per-package flycheck for JSON projects, the code
assumed that `world.flycheck` indices matched `world.workspaces` indices.
However, not all workspaces have flycheck enabled (e.g., JSON projects
without a flycheck template configured), so the flycheck vector can be
shorter than the workspaces vector.

This caused an index-out-of-bounds panic when saving a file in a JSON
project without flycheck configured:

  thread 'Worker' panicked at notification.rs:
  index out of bounds: the len is 0 but the index is 0

Fix by looking up the flycheck handle by its ID (which is the workspace
index set during spawn) rather than using the workspace index directly
as a vector index.
2026-01-15 12:56:01 +01:00
Shoyu Vanilla (Flint)
70f4111d67
Merge pull request #21465 from A4-Tacks/prec-cast-before-angle
Fix false positive precedence in `(2 as i32) < 3`
2026-01-15 09:09:18 +00:00
Laurențiu Nicola
5c1acd6ad1
Merge pull request #21471 from rust-lang/rustc-pull
minor: Rustc pull update
2026-01-15 06:49:20 +00:00
The rustc-josh-sync Cronjob Bot
52159b6fbb Merge ref 'b6fdaf2a15' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@b6fdaf2a15
Filtered ref: rust-lang/rust-analyzer@21d86db301
Upstream diff: 44a5b55557...b6fdaf2a15

This merge was created using https://github.com/rust-lang/josh-sync.
2026-01-15 04:22:02 +00:00
Usman Akinyemi
54fc546f20 Recover from struct literals with placeholder or empty path
Based on earlier work by León Orell Valerian Liehr.

Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
Signed-off-by: Usman Akinyemi <uniqueusman@archlinux>
2026-01-26 04:09:28 +05:30
bors
7704328ba5 Auto merge of #151158 - Zalathar:rollup-okXJcXA, r=Zalathar
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#150846 (include `HirId`s directly in the THIR, not wrapped in `LintLevel`s)
 - rust-lang/rust#150979 (Avoid ICEs after bad patterns, for the other syntactic variants)
 - rust-lang/rust#151103 (mir_build: Simplify length-determination and indexing for array/slice patterns)
 - rust-lang/rust#151130 (resolve: Downgrade `ambiguous_glob_imports` to warn-by-default)

r? @ghost
2026-01-15 12:33:17 +00:00
Stuart Cook
256722639d
Rollup merge of #151130 - diesel2, r=lqd
resolve: Downgrade `ambiguous_glob_imports` to warn-by-default

But still keep it report-in-deps, as decided in https://github.com/rust-lang/rust/issues/149845#issuecomment-3750423840.

This will need to be reverted after ~February 27 2026, when Rust 1.95 branches out from the main branch.

Closes https://github.com/rust-lang/rust/issues/149845.
2026-01-15 21:39:04 +11:00
Stuart Cook
69f0a498ba
Rollup merge of #151103 - array-pat-len, r=Nadrieril,petrochenkov
mir_build: Simplify length-determination and indexing for array/slice patterns

The existing length-determination code in `prefix_slice_suffix` has ended up overly complicated, partly because it doesn't know in advance whether the pattern is supposed to be an array pattern or a slice pattern.

Pulling most of that step out into the `PatKind::Array` arm makes the whole thing a bit nicer overall.

There should (hopefully) be no change to compiler output. The biggest “functional” change is that we now discard the subpatterns of an array pattern of unknowable length, instead of treating it as a slice pattern. I'm not aware of any way for this to make an observable difference, and it can only occur when compilation is already doomed to fail.
2026-01-15 21:39:03 +11:00
Stuart Cook
9682509bdb
Rollup merge of #150979 - typeck-pat, r=lcnr
Avoid ICEs after bad patterns, for the other syntactic variants

This PR introduces changes equivalent to the ones in rust-lang/rust#126320, but also for struct and tuple patterns, instead of tuple struct patterns only.

Fixes rust-lang/rust#150507.
2026-01-15 21:39:03 +11:00
Stuart Cook
eafe40e05c
Rollup merge of #150846 - thir-hir-id, r=lcnr
include `HirId`s directly in the THIR, not wrapped in `LintLevel`s

Occurrences of `LintLevel` in the THIR were always `LintLevel::Explicit`, containing a `HirId`, so we don't need to make it possible to put `LintLevel::Inherited` there. Removing the unused case where `HirId`s aren't present in the THIR slightly simplifies diagnostics/lints/tools that want to map from the THIR back to the HIR, e.g. rust-lang/rust#145569.

Since `LintLevel` is no longer present in the THIR, I've moved it in the second commit to live in `rustc_mir_build`; that's where it's actually used. I'm not sure exactly where exactly it should live there, but I put it in the `builder::scope` module since it's used by `Builder::in_scope` for determining when to introduce source scopes.

r? lcnr as the reviewer of rust-lang/rust#145569, since this was discussed there
2026-01-15 21:39:02 +11:00
Vadim Petrochenkov
cd05071ec4 resolve: Downgrade ambiguous_glob_imports to warn-by-default
But still keep it report-in-deps.

To revert after ~February 27 2026, when Rust 1.95 branches out from the main branch.
2026-01-15 13:02:20 +03:00