about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-diagnostics
AgeCommit message (Collapse)AuthorLines
2025-09-28Merge pull request #19867 from Kivooeo/unsafegateLukas Wirth-0/+43
Allow `&raw [mut | const]` for union field
2025-09-25Fix fixes for unused raw variablesA4-Tacks-2/+16
Example --- ``` fn main() { let $0r#type = 2; } ``` **Before this PR**: ```rust fn main() { let _r#type = 2; } ``` **After this PR**: ```rust fn main() { let _type = 2; } ```
2025-09-22Fix lifetime elision handling for `Fn`-style trait boundsChayim Refael Friedman-0/+12
Two fixes were needed: 1. Previously, we enabled elision for the generic args of `Fn` itself, instead of for generic args of paths within it. 2. In lowering in the new solver the `Output` parameter did not have elision set correctly, I don't know why. In the old lowering it was done correctly.
2025-09-20allow take union field addresses in safe rustKivooeo-0/+43
2025-09-20Fix unused_variables fixes shorthand record fieldA4-Tacks-11/+57
Example --- ```rust struct S { field : u32 } fn main() { let s = S { field : 2 }; let S { $0field } = s } ``` **Before this PR**: ```rust struct S { field : u32 } fn main() { let s = S { field : 2 }; let S { _field } = s } ``` **After this PR**: ```rust struct S { field : u32 } fn main() { let s = S { field : 2 }; let S { field: _field } = s } ```
2025-09-18Merge pull request #20664 from ChayimFriedman2/coerce-nsChayim Refael Friedman-2/+24
fix: Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics
2025-09-16Merge pull request #20517 from Veykril/veykril/push-wrurmtqppzusLukas Wirth-6/+6
fix: Only compute unstable paths on nightly toolchains for IDE features
2025-09-16fix: Only compute unstable paths on nightly toolchains for IDE featuresLukas Wirth-6/+6
2025-09-15Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnosticsChayim Refael Friedman-2/+24
This started from porting coercion, but ended with porting much more.
2025-09-11Merge pull request #20642 from ChayimFriedman2/wasm-safeShoyu Vanilla (Flint)-0/+16
fix: Make `#[target_feature]` always safe on WASM
2025-09-09Merge pull request #20613 from A4-Tacks/diag-unresolved-field-fixes-wsDavid Barsky-13/+52
Fix indent for unresolved_field fixes
2025-09-10Fix failing tests and fill-in missing detailsShoyu Vanilla-2/+1
2025-09-09Make `#[target_feature]` safe always on WASMChayim Refael Friedman-0/+16
Even when the feature isn't enabled, as it's not UB to invoke an undefined feature in WASM (just a trap).
2025-09-08Remove support for register_attrWilfred Hughes-4/+1
This was removed in rustc in 2022: https://github.com/rust-lang/rust/pull/101123 Closes #20525.
2025-09-07Improve make::struct_ field_list whitespaceA4-Tacks-12/+12
Example --- **Before this PR**: ```rust struct Variant{ field: u32 } ``` **After this PR**: ```rust struct Variant { field: u32 } ```
2025-09-05Fix indent for unresolved_field fixesA4-Tacks-13/+52
Examples --- ```rust mod indent { struct Foo {} fn foo() { let foo = Foo{}; foo.bar$0; } } ``` **Before this PR**: ```rust mod indent { struct Foo { bar: () } fn foo() { let foo = Foo{}; foo.bar; } } ``` **After this PR**: ```rust mod indent { struct Foo { bar: () } fn foo() { let foo = Foo{}; foo.bar; } } ``` --- New field list add newline ```rust mod indent { struct Foo; fn foo() { Foo.bar$0; } } ``` **Before this PR**: ```rust mod indent { struct Foo{ bar: () } fn foo() { Foo.bar; } } ``` **After this PR**: ```rust mod indent { struct Foo { bar: (), } fn foo() { Foo.bar; } } ```
2025-08-18Auto-attach database in `Analysis` callsLukas Wirth-36/+51
2025-08-09Implement next trait solverjackh726-7/+12
2025-08-02When renaming a parameter to `self`, change callers to use method call syntaxChayim Refael Friedman-1/+1
2025-07-31`cargo clippy --fix`Lukas Wirth-82/+71
2025-07-22fix: Apply adjusts to pats and exprs when doing pat analysisShoyu Vanilla-0/+24
2025-07-15Infer lifetimes for GATs in expression/pattern positionChayim Refael Friedman-0/+24
We should not only in type position.
2025-07-09Differentiate between `asm!()`, `global_asm!()` and `naked_asm!()`, and make ↵Chayim Refael Friedman-0/+15
only `asm!()` unsafe
2025-07-03fix: Closure capturing for let exprs, againShoyu Vanilla-0/+18
2025-07-03fix: Improve diagnostic ranges for `macro_calls!`Lukas Wirth-14/+14
We used to point to the entire macro call including its token tree if we couldn't upmap the diagnostic to the input This generally makes things very noisy as the entire macro call will turn red on errors. Instead, we now macro the path and `!` (bang) token as the error source range which is a lot nicer on the eyes.
2025-06-24Merge pull request #20036 from Veykril/push-yquvoyrxkksxLukas Wirth-1/+1
Do not default to 'static for trait object lifetimes
2025-06-24Do not default to 'static for trait object lifetimesLukas Wirth-1/+1
We lack trait object default lifetime elision, so `'static` can be wrong at times, confusing the user
2025-06-23Don't run doctestsChayim Refael Friedman-0/+1
2025-06-22Minic rustc's new `format_args!` expansionShoyu Vanilla-0/+25
2025-06-19fix: Closure capturing for let exprsShoyu Vanilla-0/+19
2025-06-17Never make type mismatch diagnostic stable, even when there is a fixChayim Refael Friedman-6/+2
We show fixes now even for experimental diagnostics anyway, and it has false positives.
2025-06-17chore: Start infesting ide crates with 'db lifetimeLukas Wirth-25/+34
2025-06-17Merge pull request #19945 from ChayimFriedman2/private-field-quickfixLukas Wirth-32/+125
feat: Add the quickfix for increasing visibility of a private field to the private-field diagnostic (previously it was only on no-such-field)
2025-06-10Merge pull request #19963 from ChayimFriedman2/unsized-impl-itemsLukas Wirth-0/+29
fix: Do not error at impls for unsized types that do not include `where Self: Sized` items
2025-06-10Do not error at impls for unsized types that do not include `where Self: ↵Chayim Refael Friedman-0/+29
Sized` items
2025-06-09Stabilize the "JSON is not Rust" diagnosticChayim Refael Friedman-0/+1
2025-06-08Add the quickfix for increasing visibility of a private field to the ↵Chayim Refael Friedman-32/+125
private-field diagnostic (previously it was only on no-such-field) The difference between the diagnostics is that no-such-field is for record struct construction, while private-field is for dot syntax. I tried to unify them, but there is a bit of uniqueness in each. This is possible but maybe not worth it. Also, fix the quickfix when there is already a visibility to the field (replace it instead of appending to it).
2025-06-06Stabilize unlinked file diagnosticChayim Refael Friedman-0/+1
2025-06-02Add a quickfix for accessing a private field of a structTyler Breisacher-30/+127
2025-06-02Enhance renaming to include identifiers that are generated from the original ↵Lukas Wirth-2/+2
symbol Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2025-05-29fix: Fix import insertion not being fully cfg awareLukas Wirth-5/+1
2025-05-28fix: Skip pattern analysis on type mismatchesShoyu Vanilla-0/+14
2025-05-26Merge pull request #19851 from ChayimFriedman2/normalize-exhaustivenessLukas Wirth-0/+25
fix: Normalize when checking for uninhabited types for pattern exhaustiveness checking
2025-05-23Normalize when checking for uninhabited types for pattern exhaustiveness ↵Chayim Refael Friedman-0/+25
checking
2025-05-19Fix cache problems with lints levelChayim Refael Friedman-164/+60
By removing the cache.
2025-05-15Improve asm supportChayim Refael Friedman-0/+21
Including: - Infer `label {}` and `const` operands. - Correctly handle unsafe check inside `label {}`. - Fix an embarrassing parser typo that cause labels to never be part of the AST
2025-05-09Make diagnostics experimental by defaultFlorian Diebold-33/+47
2025-05-05refactor: De-arc defmap queriesLukas Wirth-3/+5
2025-05-02Render more lifetimesLukas Wirth-10/+9
2025-05-01remove a couple of clonesMatthias Krüger-1/+1