about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/syntax
AgeCommit message (Collapse)AuthorLines
2025-04-05Clean up `rustc-literal-escaper` usage in rust-analyzerGuillaume Gomez-3/+1
2025-04-04Update `rustc-literal-escaper` version to `0.0.2`Guillaume Gomez-1/+1
2025-04-04Remove usage of `rustc_lexer::unescape` in rust-analyzerGuillaume Gomez-13/+7
2025-03-10Merge pull request #19314 from snprajwal/variantdef-implLukas Wirth-0/+55
fix(hir): `VariantDef` is `impl HasSource`
2025-03-09fix: Prevent wrong invocations of `needs_parens_in` with non-ancestral "parent"sShoyu Vanilla-8/+55
2025-03-09internal: Migrate `inline_local_variable` to `SyntaxEditor`Shoyu Vanilla-0/+21
2025-03-08fix(hir): `VariantDef` is `impl HasSource`Prajwal S N-0/+55
A new syntax node `ast::VariantDef` has been introduced to map between the HIR node and the AST. The files have been updated with `cargo test -p xtask`. Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-03-05Merge pull request #19265 from Shourya742/2025-03-01-add-dangling-dyn-diagnosticLaurențiu Nicola-9/+103
feat: Add diagnostic for dangling dyn and impl
2025-03-03Add dangling implbit-aloo-31/+54
- Adds dangling impl diagnostics - Rename validation test from dangling_impl to dangling_iml_ref
2025-03-02add diagnostic for dangling implbit-aloo-3/+40
2025-03-02add diagnostic for dangling dynbit-aloo-9/+43
2025-03-02Merge pull request #19253 from ShoyuVanilla/migrate-convert-bool-thenLukas Wirth-26/+118
internal: Migrate `convert_bool_then` to `SyntaxEditor`
2025-03-01Merge pull request #19251 from Veykril/push-tkmpqtzxynxkLukas Wirth-1/+16
Remove syntax editing from parenthesis computation
2025-03-01Remove syntax editing from parenthesis computationLukas Wirth-1/+16
2025-03-01Cleanup string handling in syntax highlightingLukas Wirth-3/+3
2025-03-01Migrate `convert_bool_then` to `SyntaxEditor`Shoyu Vanilla-26/+118
Update assist docs
2025-02-28Have inline_local_variable use precedence calculation for parenthesesLukas Wirth-5/+12
2025-02-28Merge pull request #19249 from Veykril/push-noosrywrsuvnLukas Wirth-8/+11
Fix prefix adjustment hints unnecessarily introducing parens
2025-02-28Fix prefix adjustment hints unnecessarily introducing parensLukas Wirth-8/+11
2025-02-27fix doc testsBenjaminBrienen-3/+3
2025-02-27enable doctestBenjaminBrienen-1/+0
2025-02-25internal: Migrate `remove_unused_param` assist to `SyntaxEditor`Giga Bowser-2/+22
2025-02-25fix: Properly handle removals in `SyntaxEditor`Giga Bowser-6/+18
2025-02-25internal: Improve reporting of intersecting changesGiga Bowser-6/+140
2025-02-24Add `take()` method to `SyntaxEditor`Shoyu Vanilla-1/+6
2025-02-24Migrate some leftovers in `add_missing_match_arms`Shoyu Vanilla-1/+157
2025-02-14internal: Remove mutable syntax tree usages from `add_missing_match_arms` assistShoyu Vanilla-47/+2
2025-01-29Merge pull request #19070 from Veykril/push-wpqzmznymtrnLukas Wirth-1/+116
Remove mutable syntax tree shenanigans from adjustment hints
2025-01-29Remove mutable syntax tree shenanigans from adjustment hintsLukas Wirth-1/+116
2025-01-28Merge pull request #19015 from Wilfred/mdbookLukas Wirth-2/+2
manual: Convert to mdbook
2025-01-27feat: Implement `default-field-values`Shoyu Vanilla-1/+5
2025-01-25Skip redundant path search in `resolve_completion_edits`Lukas Wirth-1/+11
2025-01-24manual: Convert to mdbookWilfred Hughes-2/+2
Split manual.adoc into markdown files, one for each chapter. For the parts of the manual that are generated from source code doc comments, update the comments to use markdown syntax and update the code generators to write to `generated.md` files. For the weekly release, stop copying the .adoc files to the `rust-analyzer/rust-analyzer.github.io` at release time. Instead, we'll sync the manual hourly from this repository. See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226 for the sync. This PR should be merged first, and that PR needs to be merged before the next weekly release. This change is based on #15795, but rebased and updated. I've also manually checked each page for markdown syntax issues and fixed any I encountered. Co-authored-by: Lukas Wirth <lukastw97@gmail.com> Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
2025-01-10Re-implement rust string highlighting via tool attributeLukas Wirth-0/+8
2025-01-08internal: Migrate `unwrap_return_type` assist to use `SyntaxEditor`Giga Bowser-3/+3
Also changes `make::expr_empty_block()` to return `ast::BlockExpr` instead of `ast::Expr`
2025-01-08internal: Migrate `wrap_return_type` assist to use `SyntaxEditor`Giga Bowser-5/+105
2025-01-06internal: Add some pattern constructors to `SyntaxFactory`Giga Bowser-0/+26
2025-01-06internal: Add some expr constructors to `SyntaxFactory`Giga Bowser-2/+175
2025-01-06internal: Add some path constructors to `SyntaxFactory`Giga Bowser-1/+77
2025-01-06internal: `make::expr_match` should return `ast::MatchExpr`Giga Bowser-1/+1
2025-01-06internal: Generally improve `make::match_arm`Giga Bowser-11/+24
`make::match_arm` should take a single `ast::Pat`, and callers can handle creating an `ast::OrPat` if need be. It should also take a proper `ast::MatchGuard`, instead of making one itself.
2025-01-06internal: move `make::expr_unit` to `make::ext::expr_unit`Giga Bowser-7/+7
`expr_unit` is just a shortcut for a common expression, so it belongs in `make::ext`
2025-01-06internal: `make::expr_tuple` should return `ast::TupleExpr`Giga Bowser-2/+3
2025-01-06internal: `make::expr_if` should return `ast::IfExpr`Giga Bowser-1/+1
2025-01-06internal: `make::expr_prefix` should return `ast::PrefixExpr`Giga Bowser-1/+1
2025-01-06internal: Generalize `make::expr_from_text` to types which implement ↵Giga Bowser-1/+1
`Into<ast::Expr>` This will help with specializing the various `make::expr_*` functions later
2025-01-06minor: New clippy lintsLukas Wirth-7/+7
2025-01-04Support the new `CoercePointee` deriveChayim Refael Friedman-1/+19
2024-12-30Move some more AST makers to the quote macroChayim Refael Friedman-52/+56
And implement addons as necessary. There are many more makers to be moved, and I'm not completely satisfied with this (due to the ease of making a mistake in the AST structure, and slightly less but also because of the need to remember whitespaces), but this is already enough to see how this will look like.
2024-12-30Create a `quote!`-like API for crafting AST nodesChayim Refael Friedman-9/+182
Instead of messing with textual `make`. And port one `make` helper to it, for the sake of testing.