Commit graph

23197 commits

Author SHA1 Message Date
Chayim Refael Friedman
f8fdf544e4
Merge pull request #20805 from A4-Tacks/improve-static-const-parse-error
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Improve parsing error for `static` and `const`
2025-10-09 03:09:29 +00:00
A4-Tacks
2707cf7ce6
Allow generic_param_list for static items 2025-10-09 09:45:42 +08:00
Chayim Refael Friedman
11e29a4d7c
Merge pull request #20812 from A4-Tacks/comp-trait-self-param
Add self param completions for trait assoc fn
2025-10-08 23:28:22 +00:00
Chayim Refael Friedman
2b240c6490 Migrate drop glue handling to new solver
And:
 - Remove it from being a query (it is only used for hover, where no caching is needed, and MIR evaluation of `needs_drop()`, which is rare).
 - Fix handling of `PhantomData`.
2025-10-08 16:14:22 +03:00
A4-Tacks
bd2f70105b
Add self param completions for trait assoc fn
Example
---
```rust
trait A {
    fn foo(file_id: usize) {}
    fn new($0) {}
}
```

**Before this PR**:

```text
bn file_id: usize
kw mut
kw ref
```

**After this PR**:

```text
bn &mut self
bn &self
bn file_id: usize
bn mut self
bn self
kw mut
kw ref
```
2025-10-08 16:20:10 +08:00
Shoyu Vanilla (Flint)
29362574eb
Merge pull request #20792 from A4-Tacks/minor-fix-make-extract-ty-alias
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
minor: Fix using `make::ty` for extract_type_alias
2025-10-07 09:31:17 +00:00
Shoyu Vanilla (Flint)
bd56dd3feb
Merge pull request #19771 from A4-Tacks/gen-blanket-trait-impl
Add ide-assist: generate blanket trait impl
2025-10-07 08:52:48 +00:00
Lukas Wirth
3cde23612e
Merge pull request #20803 from SomeoneToIgnore/nocapture
Some checks are pending
metrics / generate_final_metrics (push) Blocked by required conditions
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Replace `--show-output` task defaults with `--nocapture`
2025-10-07 08:27:08 +00:00
David Barsky
7e9be347cc
Merge pull request #20796 from ChayimFriedman2/bump-salsa
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
internal: Bump Salsa
2025-10-06 16:23:20 +00:00
Lukas Wirth
25c6fd7211 feat: Log flycheck stdout and stderr to files 2025-10-06 12:55:13 +02:00
A4-Tacks
216db6d5b4
Improve parsing error for static and const
Example
---
```rust
static C<i32>: u32 = 0;
```
->
```diff
-error 8: missing type for `const` or `static`
+error 8: `static` may not have generic parameters
```

---

```rust
const C = 0;
```
->
```diff
-error 7: missing type for `const` or `static`
+error 7: missing type for `const`
```

---

```rust
static C = 0;
```
->
```diff
-error 8: missing type for `const` or `static`
+error 8: missing type for `static`
```
2025-10-06 12:48:38 +08:00
Kirill Bulatov
d0e07f080b Replace --show-output with --nocapture
The former does not show any output before the test is finished, which prevents long-running/stuck tests from showing any useful information.
2025-10-05 22:28:00 +03:00
Chayim Refael Friedman
f0b496cbc7
Merge pull request #20802 from ChayimFriedman2/regression20662
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
minor: Add regression test for need-mut diagnostic
2025-10-05 19:06:18 +00:00
Chayim Refael Friedman
8121727283 Add regression test for need-mut diagnostic 2025-10-05 21:57:22 +03:00
A4-Tacks
224e89e382
minor: Remove FIXME for test_tuple_field_inference
This seems to have been fixed
2025-10-05 15:35:30 +08:00
Chayim Refael Friedman
c6ef51e550 Switch to home-made db attaching infrastructure
Instead of using Salsa's, as we can no longer can a `dyn HirDatabase` from the `dyn salsa::Database` Salsa provides.
2025-10-05 09:55:50 +03:00
Chayim Refael Friedman
cd81783b5d
Merge pull request #20795 from A4-Tacks/parse-edition-extract-expr-format-str
minor: Fix CURRENT_FIXME for extract_expressions_from_format_string
2025-10-05 06:53:17 +00:00
Chayim Refael Friedman
940e1308f2
Merge pull request #20793 from A4-Tacks/diag-paren-missing-unsafe
Fix missing parentheses for missing_unsafe
2025-10-05 06:52:31 +00:00
A4-Tacks
a068ef86e3
Fix parentheses for missing_unsafe
I seem unable to use `Expr::needs_parens*` to complete it

Example
---
```rust
static mut STATIC_MUT: u8 = 0;

fn foo() -> u8 {
    STATIC_MUT$0 * 2
}
```

**Before this PR**:

```rust
static mut STATIC_MUT: u8 = 0;

fn foo() -> u8 {
    unsafe { STATIC_MUT } * 2
}
```

**After this PR**:

```rust
static mut STATIC_MUT: u8 = 0;

fn foo() -> u8 {
    (unsafe { STATIC_MUT }) * 2
}
```
2025-10-05 14:02:49 +08:00
A4-Tacks
438dff329f
minor: Fix CURRENT_FIXME for extract_expressions_from_format_string 2025-10-05 13:54:07 +08:00
itsjunetime
42f7666b79
Deduplicate sort+dedup calls 2025-10-04 13:00:09 -05:00
itsjunetime
10763b03b3
Move salsa attach to end before call to run_ide_things 2025-10-04 12:30:15 -05:00
David Barsky
a7234f8b3a internal: bump salsa to 0.24 2025-10-04 09:47:26 -07:00
A4-Tacks
9fd6d5f0d5
minor: Fix using make::ty for extract_type_alias 2025-10-04 19:33:29 +08:00
Chayim Refael Friedman
797ba9c7cb Fix erroneous diagnostic incorrect_generics_len when there are generics on enum variant used through type alias 2025-10-03 06:54:32 +03:00
Shoyu Vanilla (Flint)
465fea70c0
Merge pull request #20720 from ChayimFriedman2/no-rustup-auto-install
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
fix: Prevent rustup from automatically installing toolchains
2025-10-02 05:15:45 +00:00
Laurențiu Nicola
9d347b0cc7
Merge pull request #20779 from rust-lang/rustc-pull
minor: Rustc pull update
2025-10-02 04:25:20 +00:00
Laurențiu Nicola
436fb5ca54 Format code 2025-10-02 07:16:40 +03:00
Laurențiu Nicola
d9cdc03c05
Merge pull request #20778 from itsjunetime/clippy_fixes
Fix small things clippy was complaining about
2025-10-02 04:10:00 +00:00
The rustc-josh-sync Cronjob Bot
ab424b7205 Merge ref '3369e82c6bc0' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 3369e82c6bc03c5cdb66f730dba6f738b74c8e1d
Filtered ref: abf6c425d3
Upstream diff: f957826bff...3369e82c6b

This merge was created using https://github.com/rust-lang/josh-sync.
2025-10-02 04:07:04 +00:00
itsjunetime
8e350c5f27
Get rid of unfulfilled expectation 2025-10-01 23:00:16 -05:00
itsjunetime
3a6e472975
Fix two small things clippy was complaining about 2025-10-01 22:41:01 -05:00
Shoyu Vanilla (Flint)
3706595ad2
Merge pull request #20770 from ChayimFriedman2/unsafe-impl-unresolved
fix: Ignore impl trait safety errors when the trait is unresolved
2025-10-02 03:29:55 +00:00
bors
abf6c425d3 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
Chayim Refael Friedman
3f6d9e293a
Merge pull request #20765 from ChayimFriedman2/infer-ns-types
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
internal: Migrate inference to next solver
2025-10-01 13:19:00 +00:00
Chayim Refael Friedman
428405da33 Prevent rustup from automatically installing toolchains
By setting RUSTUP_AUTO_INSTALL=0.
2025-09-30 19:02:10 +03:00
Chayim Refael Friedman
572e703df0 Ignore impl trait safety errors when the trait is unresolved 2025-09-30 18:48:54 +03:00
Chayim Refael Friedman
6e04e82ff0 Add regression test for another (long-standing) bug fixed by the new solver 2025-09-30 18:07:27 +03:00
Chayim Refael Friedman
e3287fc878 Impl std::error::Error for SyntaxError 2025-09-30 15:40:54 +03:00
Chayim Refael Friedman
d1288f6353 Migrate inference to next solver 2025-09-30 13:10:59 +03:00
Shoyu Vanilla (Flint)
2b2d9d8f88
Merge pull request #20745 from Oblarg/fix-negative-int-literals-in-macro-by-example
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Fix negative integer literals in const generics in declarative macro context
2025-09-30 05:06:47 +00:00
Oblarg
b8852fdbb3 move test per review feedback 2025-09-29 11:18:49 -04:00
Shoyu Vanilla (Flint)
062ac7a545
Merge pull request #20760 from A4-Tacks/all-any-not-attr-comp
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Add `all` `any` and `not` attribute completions
2025-09-29 08:33:17 +00:00
The rustc-josh-sync Cronjob Bot
253554e554 Merge ref 'f957826bff7a' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: f957826bff7a68b267ce75b1ea56352aed0cca0a
Filtered ref: 7291893f9d
Upstream diff: caccb4d036...f957826bff

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-29 04:07:50 +00:00
Jubilee Young
a805c9b464 remove explicit deref of AbiAlign for most methods
Much of the compiler calls functions on Align projected from AbiAlign.
AbiAlign impls Deref to its inner Align, so we can simplify these away.
Also, it will minimize disruption when AbiAlign is removed.

For now, preserve usages that might resolve to PartialOrd or PartialEq,
as those have odd inference.
2025-09-28 15:02:14 -07:00
Lukas Wirth
5c0b555a65
Merge pull request #19867 from Kivooeo/unsafegate
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Allow `&raw [mut | const]` for union field
2025-09-28 11:54:24 +00:00
A4-Tacks
6bb1b88677
Add all any and not attribute completions
Example
---
`#[cfg($0)]` -> `#[cfg(any($0))]`
2025-09-28 08:42:18 +08:00
Shoyu Vanilla (Flint)
a56e57752f
Merge pull request #20748 from A4-Tacks/migrate-arith-op-prec
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Migrate `replace_arith_op` assist to use `SyntaxEditor`
2025-09-26 09:05:59 +00:00
Shoyu Vanilla (Flint)
62809824ad
Merge pull request #20599 from A4-Tacks/bang-de-morgan
Add applicable on bang `!` for apply_demorgan
2025-09-26 08:58:07 +00:00
A4-Tacks
918d3b8175
Migrate replace_arith_op assist to use SyntaxEditor 2025-09-26 16:54:47 +08:00