about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/parser/test_data/generated
AgeCommit message (Collapse)AuthorLines
2025-08-10parser: fix parsing of trait bound polarity and for-bindersNathaniel McCallum-0/+6
The rustc AST allows both `for<>` binders and `?` polarity modifiers in trait bounds, but they are parsed in a specific order and validated for correctness: 1. `for<>` binder is parsed first. 2. Polarity modifiers (`?`, `!`) are parsed second. 3. The parser validates that binders and polarity modifiers do not conflict: ```rust if let Some(binder_span) = binder_span { match modifiers.polarity { BoundPolarity::Maybe(polarity_span) => { // Error: "for<...> binder not allowed with ? polarity" } } } ``` This implies: - `for<> ?Sized` → Valid syntax. Invalid semantics. - `?for<> Sized` → Invalid syntax. However, rust-analyzer incorrectly had special-case logic that allowed `?for<>` as valid syntax. This fix removes that incorrect special case, making rust-analyzer reject `?for<> Sized` as a syntax error, matching rustc behavior. This has caused confusion in other crates (such as syn) which rely on these files to implement correct syntax evaluation.
2025-07-22Parse `for<'a> [const]`Chayim Refael Friedman-0/+8
And also refactor parsing of HRTB.
2025-07-09Make `global_asm!()` workChayim Refael Friedman-0/+2
Because apparently, we were not accepting inline asm in item position, completely breaking it.
2025-07-09Differentiate between `asm!()`, `global_asm!()` and `naked_asm!()`, and make ↵Chayim Refael Friedman-0/+2
only `asm!()` unsafe
2025-06-05Better parser recovery for macro calls in type bound positionLukas Wirth-0/+4
2025-05-30Run 'cargo codegen' to update testsArthur Baars-0/+4
2025-05-15Improve asm supportChayim Refael Friedman-0/+2
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-04-30fix: Improve parser recovery a bitLukas Wirth-0/+4
2025-04-22Merge pull request #19657 from ChayimFriedman2/better-offset-ofLukas Wirth-0/+4
feat: Better support `offset_of!()`
2025-04-21Allow wrapping `builtin#offset_of` fields argument in parenthesesChayim Refael Friedman-0/+4
This is necessary to correctly handle nested fields (`foo.bar`), see the comments in the code for explanation.
2025-04-21Parse generic constsChayim Refael Friedman-0/+12
A lang team experiment, https://github.com/rust-lang/rust/issues/113521.
2025-03-17chore: Bump `Edition::CURRENT` to 2024Lukas Wirth-1/+6
2025-02-23Fix codegen of parser inline tests runnerniller-g-4/+4
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-01-27feat: Implement `default-field-values`Shoyu Vanilla-0/+12
2024-12-20Fix a case where completion was unable to expand a macroChayim Refael Friedman-0/+4
Which caused the macros of the popular `tracing` crate to not offer completions. The reason is rather complicated: it boils down to macro ignoring their input and completion always choosing the first expansion.
2024-12-06Merge pull request #18625 from Veykril/push-npnxwpxuzlqzLukas Wirth-0/+2
fix: Fix parser getting stuck for bad asm expressions
2024-12-06fix: Fix parser getting stuck for bad asm expressionsLukas Wirth-0/+2
2024-12-05fix: Fix parsing of dyn T in generic arg on 2015 editionLukas Wirth-0/+7
2024-12-05fix: Fix parsing of integer/keyword name refs in various placesLukas Wirth-4/+4
2024-12-04Fix parsing of parenthesized type args and RTNLukas Wirth-24/+8
2024-12-04Better parser recovery for incomplete attributesLukas Wirth-0/+2
2024-10-31Parse patterns with leading pipe properly in all placesChayim Refael Friedman-0/+4
2024-10-30Only parse `safe` as contextual kw in extern blocksChayim Refael Friedman-0/+4
I don't like the party of `bool`s that is becoming, but two isn't worth a refactoring yet IMO.
2024-09-04Parse builtin#asm expressionsLukas Wirth-0/+2
2024-08-26Fix Return Type Syntax to include `..` (i.e. `method(..)` and not ↵Chayim Refael Friedman-4/+10
`method()`) as specified in the RFC
2024-07-23chore: update codegenswinstxnhdw-0/+4
2024-07-19Parse contextual dyn keyword properly in edition 2015Lukas Wirth-0/+7
2024-07-19Parse `try` as a keyword only in edition 2018 and upLukas Wirth-2/+8
2024-07-19Add basic edition inline parser test supportLukas Wirth-4/+9
2024-07-18Rewrite inline parser test infra to generated proper rust test casesLukas Wirth-0/+810