summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-diagnostics
AgeCommit message (Collapse)AuthorLines
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).
2025-04-07Merge pull request #19432 from ShoyuVanilla/issue-19431Lukas Wirth-1/+45
fix: Yet another false positive invalid cast diagnostic
2025-04-04prefer default over newBenjaminBrienen-1/+1
2025-04-01chore: Remove unnecessary `Arc` clonesLukas Wirth-16/+1
2025-03-28Fix a bug in orphan rules calculationChayim Refael Friedman-0/+13
Where a fundamental type applied twice wasn't considered local.
2025-03-24fix: Yet another false positive invalid cast diagnosticShoyu Vanilla-1/+45
2025-03-23chore: Bump dependenciesLukas Wirth-2/+2
2025-03-22Speed up resolving "Generate delegate method" assist (part 2)Felicián Németh-16/+16
Make it compile by adding a `None` subtype to rest of the AssistId instantiations.
2025-03-19change test name to sth meaningfulAli Bektas-1/+1
2025-03-19Fix span info for mir::OperandAli Bektas-2/+17
Fixes #19172
2025-03-17chore: Bump `Edition::CURRENT` to 2024Lukas Wirth-5/+5
2025-03-16Merge pull request #19354 from ChayimFriedman2/rtn-prepLukas Wirth-0/+54
Preparation to Return Type Notation (RTN)
2025-03-15cargo fmtBenjaminBrienen-114/+96
2025-03-15Fix 2024 syntax errorsBenjaminBrienen-1/+2
2025-03-13internal: don't panic when the crate graph isn't ready #19351David Barsky-3/+11
2025-03-12Emit an error when RTN is used in an incorrect placeChayim Refael Friedman-0/+54
We miss one place: associated type bindings aka. `impl Trait<Type(..): Send>`, but we also miss it for Fn-style parenthesizes error so I left it out for now.
2025-03-12Salsify the crate graphChayim Refael Friedman-3/+3
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
2025-03-10internal: port rust-analyzer to new SalsaDavid Barsky-32/+45
2025-03-06Pass the target crate in `HirFormatter`Chayim Refael Friedman-16/+31
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
2025-02-27fix doc testsBenjaminBrienen-1/+1
2025-02-27enable doctestBenjaminBrienen-1/+0
2025-02-25Support target features implications in target_feature 1.1Chayim Refael Friedman-1/+1
We vendor the list of implications, which isn't nice, but t-compiler doesn't want to make rustc_target available to us.
2025-02-20Improve unset OUT_DIR error messageLukas Wirth-2/+2
2025-02-17Fix detection of ref patterns for path patternsChayim Refael Friedman-0/+21
I was wrong on #19127, I thought hir-def resolver is enough for them, but it turns out not because of paths like `<Enum>::Variant` and `Type::AssocThatIsEnum::Variant`.
2025-02-17Merge pull request #19127 from ChayimFriedman2/different-generic-argsLukas Wirth-1/+66
feat: Refactor path lowering and serve a new path diagnostic
2025-02-16Refactor path loweringChayim Refael Friedman-1/+66
And add a new diagnostic for non-`Fn` parenthesized generic args. Path lowering started to look like a mess, with each function carrying additional parameters for the diagnostic callback (since paths can occur both in type and in expression/pattern position, and their diagnostic handling is different) and the segment index, for the diagnostics report. So I refactored it from stateless functions on `TyLoweringContext` into stateful struct, `PathLoweringContext`, that tracks the process of lowering a path from resolution til assoc types selection.
2025-02-16Improve error recovery when method-calling an assoc functionLukas Wirth-26/+21
2025-02-12Merge pull request #18995 from alibektas/12210Lukas Wirth-7/+8
fix: Lower range pattern bounds to expressions
2025-02-12Propogate error types in mir type projectionsLukas Wirth-0/+13
2025-02-07fix: Resolve projection types before checking castsShoyu Vanilla-0/+35
2025-02-03Do not use make use of `InferenceResult::has_errors` flag for mir buildingLukas Wirth-1/+4
It generaly does not work as expected right now as we fallback type parameters to errors