1021 Commits

Author SHA1 Message Date
Lukas Wirth
452e2ca031 feat: parse unsafe record fields 2025-03-25 08:55:31 +01:00
Lukas Wirth
500ea05aef chore: Bump dependencies 2025-03-23 08:46:10 +01:00
Lukas Wirth
d4122434dd chore: Remove unused dependencies 2025-03-23 08:08:17 +01:00
Lukas Wirth
d31301cbe7 refactor: Reduce codegen burden for SyntaxNode and SyntaxToken 2025-03-21 12:14:39 +01:00
Ali Bektas
477b987179 Observe unsafeness when generating manual impls of former derives 2025-03-17 21:55:27 +01:00
BenjaminBrienen
7535bb4661 cargo fmt 2025-03-15 21:32:01 +01:00
BenjaminBrienen
70fc7b98c6 edition = "2024" 2025-03-15 21:32:01 +01:00
BenjaminBrienen
e70a9c5b9e rust-version = "1.85" 2025-03-15 21:32:01 +01:00
BenjaminBrienen
aad66c7bf1 Fix 2024 syntax errors 2025-03-15 21:32:01 +01:00
Vishruth-Thimmaiah
53f3e6fd5f
feat: for loop to while let assist 2025-03-14 19:15:37 +05:30
Lukas Wirth
476a0cb740
Merge pull request #19314 from snprajwal/variantdef-impl
fix(hir): `VariantDef` is `impl HasSource`
2025-03-10 08:13:24 +00:00
Shoyu Vanilla
5b202cb663 fix: Prevent wrong invocations of needs_parens_in with non-ancestral "parent"s 2025-03-09 18:54:22 +09:00
Shoyu Vanilla
c6ea7cbafa internal: Migrate inline_local_variable to SyntaxEditor 2025-03-09 15:51:37 +09:00
Prajwal S N
39391b0d38
fix(hir): VariantDef is impl HasSource
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-08 01:25:27 +05:30
Laurențiu Nicola
3c394c61b8
Merge pull request #19265 from Shourya742/2025-03-01-add-dangling-dyn-diagnostic
feat: Add diagnostic for dangling dyn and impl
2025-03-05 05:58:31 +00:00
bit-aloo
af959f9031
Add dangling impl
- Adds dangling impl diagnostics
- Rename validation test from dangling_impl to dangling_iml_ref
2025-03-03 15:58:33 +05:30
bit-aloo
0b97ae26bf
add diagnostic for dangling impl 2025-03-02 19:42:42 +05:30
bit-aloo
afe6e5ba0f
add diagnostic for dangling dyn 2025-03-02 19:41:39 +05:30
Lukas Wirth
1ce1f087da
Merge pull request #19253 from ShoyuVanilla/migrate-convert-bool-then
internal: Migrate `convert_bool_then` to `SyntaxEditor`
2025-03-02 07:21:04 +00:00
Lukas Wirth
76567ee28d
Merge pull request #19251 from Veykril/push-tkmpqtzxynxk
Remove syntax editing from parenthesis computation
2025-03-01 17:46:07 +00:00
Lukas Wirth
570c6adcd3 Remove syntax editing from parenthesis computation 2025-03-01 18:32:04 +01:00
Lukas Wirth
8f319240b4 Cleanup string handling in syntax highlighting 2025-03-01 17:44:29 +01:00
Shoyu Vanilla
37822d5917 Migrate convert_bool_then to SyntaxEditor
Update assist docs
2025-03-01 13:12:15 +09:00
Lukas Wirth
e92dc3fd80 Have inline_local_variable use precedence calculation for parentheses 2025-02-28 11:03:33 +01:00
Lukas Wirth
2c4ef382d6
Merge pull request #19249 from Veykril/push-noosrywrsuvn
Fix prefix adjustment hints unnecessarily introducing parens
2025-02-28 09:33:36 +00:00
Lukas Wirth
f655062cb0 Fix prefix adjustment hints unnecessarily introducing parens 2025-02-28 10:18:10 +01:00
BenjaminBrienen
b19ef6b046 fix doc tests 2025-02-27 14:58:46 +01:00
BenjaminBrienen
bd7375a58f enable doctest 2025-02-27 14:58:46 +01:00
Giga Bowser
f155aef64d internal: Migrate remove_unused_param assist to SyntaxEditor 2025-02-25 11:52:13 -05:00
Giga Bowser
93c9f06870 fix: Properly handle removals in SyntaxEditor 2025-02-25 11:52:13 -05:00
Giga Bowser
b4f2d62952 internal: Improve reporting of intersecting changes 2025-02-25 11:46:45 -05:00
Shoyu Vanilla
a0b9931832 Add take() method to SyntaxEditor 2025-02-24 22:42:57 +09:00
Shoyu Vanilla
f06f1b81bb Migrate some leftovers in add_missing_match_arms 2025-02-24 22:41:52 +09:00
Shoyu Vanilla
8b947d7a12 internal: Remove mutable syntax tree usages from add_missing_match_arms assist 2025-02-14 02:36:05 +09:00
Lukas Wirth
7fd6f72007
Merge pull request #19070 from Veykril/push-wpqzmznymtrn
Remove mutable syntax tree shenanigans from adjustment hints
2025-01-29 13:58:18 +00:00
Lukas Wirth
f61d31b144 Remove mutable syntax tree shenanigans from adjustment hints 2025-01-29 14:42:37 +01:00
Lukas Wirth
07a09c154e
Merge pull request #19015 from Wilfred/mdbook
manual: Convert to mdbook
2025-01-28 16:19:37 +00:00
Shoyu Vanilla
7de0b2e75a feat: Implement default-field-values 2025-01-27 19:38:35 +09:00
Lukas Wirth
ae74cc3b88 Skip redundant path search in resolve_completion_edits 2025-01-25 13:03:01 +01:00
Wilfred Hughes
deda58e8f1 manual: Convert to mdbook
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-24 13:23:22 -08:00
Lukas Wirth
bf669dab84 Re-implement rust string highlighting via tool attribute 2025-01-10 13:49:35 +01:00
Giga Bowser
a5a79f5957 internal: Migrate unwrap_return_type assist to use SyntaxEditor
Also changes `make::expr_empty_block()` to return `ast::BlockExpr` instead of `ast::Expr`
2025-01-08 18:12:06 -06:00
Giga Bowser
651b43e551 internal: Migrate wrap_return_type assist to use SyntaxEditor 2025-01-08 15:19:10 -06:00
Giga Bowser
796041acce internal: Add some pattern constructors to SyntaxFactory 2025-01-06 15:58:39 -06:00
Giga Bowser
ce2398fee8 internal: Add some expr constructors to SyntaxFactory 2025-01-06 15:58:39 -06:00
Giga Bowser
f5ff966dea internal: Add some path constructors to SyntaxFactory 2025-01-06 15:58:39 -06:00
Giga Bowser
551f1d00dd internal: make::expr_match should return ast::MatchExpr 2025-01-06 15:58:39 -06:00
Giga Bowser
32ff06d51c internal: Generally improve make::match_arm
`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-06 15:58:39 -06:00
Giga Bowser
905e1e1fc0 internal: move make::expr_unit to make::ext::expr_unit
`expr_unit` is just a shortcut for a common expression, so it belongs in `make::ext`
2025-01-06 15:58:39 -06:00
Giga Bowser
f388482119 internal: make::expr_tuple should return ast::TupleExpr 2025-01-06 15:32:08 -06:00