Lukas Wirth
5924b38e3d
Parse new const trait syntax
2025-06-26 11:08:30 +02:00
Lukas Wirth
70cbf8332a
Merge pull request #20012 from lnicola/bump-literal-escaper
...
Update to literal-escaper 0.0.4
2025-06-24 08:21:36 +00:00
Chayim Refael Friedman
de312d0c71
Don't run doctests
2025-06-23 00:50:22 +03:00
Marijn Schouten
13a46eab7d
update to literal-escaper 0.0.4 for better API without unreachable
and faster string parsing
2025-06-16 15:12:24 +03:00
Lukas Wirth
5d3001795a
Better parser recovery for macro calls in type bound position
2025-06-05 16:11:30 +02:00
Lukas Wirth
7c3de05e3a
Give path segment type anchors their own grammar rule
2025-06-04 11:40:05 +02:00
Arthur Baars
55328ba9b4
Update expected test output
2025-05-30 21:16:38 +00:00
Arthur Baars
a91b67e682
Run 'cargo codegen' to update tests
2025-05-30 21:05:12 +00:00
Arthur Baars
7f7079f2bf
Add test for closure_binder
...
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-05-30 22:58:13 +02:00
Arthur Baars
fb16d3b7f8
Produce ClosureBinder node in atom.rs
2025-05-30 22:38:31 +02:00
Laurențiu Nicola
ac8c057d87
Bump rustc crates
2025-05-20 10:03:14 +03:00
Laurențiu Nicola
9e86544698
Merge from rust-lang/rust
2025-05-20 10:01:00 +03:00
Chayim Refael Friedman
5ed11234cc
Improve asm support
...
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-15 23:36:00 +03:00
Stuart Cook
9f4e2cc51d
Rollup merge of #140035 - fee1-dead-contrib:push-oszwkkvmpkks, r=jieyouxu,wesleywiser
...
Implement RFC 3503: frontmatters
Tracking issue: #136889
Supercedes #137193 . This implements [RFC 3503](https://github.com/rust-lang/rfcs/blob/master/text/3503-frontmatter.md ).
This might break rust-analyzer. Will look into how to fix that.
Suggestions welcome for how to improve diagnostics.
2025-05-06 16:28:39 +10:00
Deadbeef
9fce1dfac5
Implement RFC 3503: frontmatters
...
Supercedes #137193
2025-05-05 23:10:08 +08:00
Lukas Wirth
e0dca847ad
fix: Improve parser recovery a bit
2025-04-30 16:40:01 +02:00
Laurențiu Nicola
1f727edb2d
Format code
2025-04-28 11:11:47 +03:00
Laurențiu Nicola
6225bb9c44
Merge from rust-lang/rust
2025-04-28 11:06:53 +03:00
Chayim Refael Friedman
8bff414abc
Preallocate parser::Input
2025-04-25 17:18:14 +03:00
Lukas Wirth
1c68d83569
Merge pull request #19657 from ChayimFriedman2/better-offset-of
...
feat: Better support `offset_of!()`
2025-04-22 13:28:34 +00:00
Lukas Wirth
e3f7d18458
Merge pull request #19643 from ChayimFriedman2/generic-const-items
...
feat: Parse generic consts
2025-04-21 12:17:08 +00:00
Lukas Wirth
1b6948e88a
feat: parse super let
2025-04-21 13:47:42 +02:00
Chayim Refael Friedman
db6db2aacc
Allow wrapping builtin#offset_of
fields argument in parentheses
...
This is necessary to correctly handle nested fields (`foo.bar`), see the comments in the code for explanation.
2025-04-21 03:43:15 +03:00
Chayim Refael Friedman
812a035689
Parse generic consts
...
A lang team experiment, https://github.com/rust-lang/rust/issues/113521 .
2025-04-21 02:11:56 +03:00
Guillaume Gomez
2135a01cbe
Clean up rustc-literal-escaper
usage in rust-analyzer
2025-04-05 20:06:52 +02:00
Guillaume Gomez
80cb724b3b
Update rustc-literal-escaper
version to 0.0.2
2025-04-04 22:26:10 +02:00
Guillaume Gomez
f2ac210f0c
Remove usage of rustc_lexer::unescape
in rust-analyzer
2025-04-04 14:59:14 +02:00
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
3d9ac497aa
fix: Fix incorrect expansion of builtin PartialOrd
derive
2025-03-21 12:14:39 +01:00
Lukas Wirth
d31301cbe7
refactor: Reduce codegen burden for SyntaxNode
and SyntaxToken
2025-03-21 12:14:39 +01:00
Lukas Wirth
d6dc1bf05e
refactor: Reduce codegen burden for SyntaxKind
2025-03-21 12:14:39 +01:00
Lukas Wirth
a505420751
chore: Bump Edition::CURRENT
to 2024
2025-03-17 12:29:19 +01:00
BenjaminBrienen
7535bb4661
cargo fmt
2025-03-15 21:32:01 +01: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
Lukas Wirth
8f319240b4
Cleanup string handling in syntax highlighting
2025-03-01 17:44:29 +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
Lukas Wirth
6d68c475c7
Merge pull request #19191 from Veykril/push-yzzlosskwrxs
...
Remove `limit` crate in favor `usize`
2025-02-23 16:50:32 +00:00
Lukas Wirth
0b2e8166a1
Remove limit
crate in favor usize
2025-02-23 17:35:09 +01:00
niller-g
18d6e281b3
Fix codegen of parser inline tests runner
...
When running `cargo codegen` the `crates/parser/test_data/generated/runner.rs` file is only updated when some file in `crates/parser/test_data/inline` changes. However this is not sufficient in all cases
2025-02-23 11:41:34 +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
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
cd199eacd0
Merge pull request #18908 from jnyfah/error-braces
...
Fix: Detect missing errors for } braces before else in let...else statements
2025-01-17 13:29:56 +00:00
jnyfah
31c07e4676
CRLF to LF
2025-01-16 16:46:06 +01:00
jnyfah
b96819ca44
added tests
2025-01-16 16:19:47 +01:00
jnyfah
2ac6cb1521
revert blocklike changes
2025-01-16 12:54:26 +01:00
jnyfah
e3deeec2f2
update blocklike
2025-01-16 12:11:55 +01:00
lh123
9809143562
feat: complete raw, const keyword
2025-01-16 18:27:59 +08:00