about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-diagnostics
AgeCommit message (Collapse)AuthorLines
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
2025-04-30Merge pull request #19247 from alibektas/19172_very_newLukas Wirth-2/+17
fix: Correct span info for mir::Operand
2025-04-28refactor: migrate `let_else_to_match` to editorPrajwal S N-3/+8
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-28Merge pull request #19704 from Veykril/push-wrvznvvpvtvpLukas Wirth-79/+46
Add expression fill mode variant for filling with underscore expressions
2025-04-28Add expression fill mode variant for filling with underscore expressionsLukas Wirth-79/+46
2025-04-24fix: Fix type argument mismatch incorrectly triggering on inferred trait argsLukas Wirth-0/+12
2025-04-24Properly handle lifetimes when checking generic arguments lenChayim Refael Friedman-0/+208
And also, prepare for correct lowering of lifetime. We still don't handle most lifetimes correctly, but a bit more of the foundation to lifetime elision is now implemented.
2025-04-23fix: Fix incorrect diagnostic for lifetime parameter count mismatchLukas Wirth-7/+9
2025-04-23Mark `incorrect_generics_len` diagnostic as experimentalLukas Wirth-0/+1
2025-04-22Add two new diagnostics: one for mismatch in generic arguments count, and ↵Chayim Refael Friedman-5/+275
another for mismatch in their kind Also known as E0747 and E0107. And by the way, rewrite how we lower generic arguments and deduplicate it between paths and method calls. The new version is taken almost straight from rustc. This commit also changes the binders of `generic_defaults()`, to only include the binders of the arguments up to (and not including) the current argument. This make it easier to handle it in the rewritten lowering of generic args. It's also how rustc does it.
2025-04-21Remove unnecessary predefined symbol clonesChayim Refael Friedman-1/+1
Now that they're const it's no longer needed. Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
2025-04-20doc: Fix dead manual linksbbb651-1/+1
2025-04-19Make `HirFileId`, `EditionedFileId` and macro files Salsa structChayim Refael Friedman-87/+123
And make more queries non-interned. Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-04-16Merge pull request #19590 from roife/fix-issue-19540Lukas Wirth-0/+18
feat: add `pub(crate) mod` option for unlinked files
2025-04-15feat: Add `pub(crate) mod` option for unlinked filesroifewu-0/+18
2025-04-10fix: Walk const block expressions for unsafety checkingLukas Wirth-0/+13
2025-04-10Remove all upcasts!Chayim Refael Friedman-6/+4
It turns out there were a lot redundant too.
2025-04-09Merge pull request #19462 from Veykril/push-ypvprvvwkyllLukas Wirth-2/+10
refactor: Lower type-refs before type inference
2025-04-09refactor: Lower type-refs before type inferenceLukas Wirth-2/+10
This refactors how we deal with items in hir-def lowering. - It now lowers all of them through an "ExpressionStore" (kind of a misnomer as this point) as their so called *Signatures. - We now uniformly lower type AST into TypeRefs before type inference. - Likewise, this moves macro expansion out of type inference, resulting in a single place where we do non-defmap macro expansion. - Finally, this PR removes a lot of information from ItemTree, making the DefMap a lot less likely to be recomputed and have it only depend on actual early name resolution related information (not 100% true, we still have ADT fields in there but thats a follow up removal).