summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/parser
AgeCommit message (Collapse)AuthorLines
2024-12-20Fix a case where completion was unable to expand a macroChayim Refael Friedman-59/+73
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-11Properly handle different defaults for severity of lintsChayim Refael Friedman-79/+4
Previously all lints were assumed to be `#[warn]`, and we had a hand-coded list of `#[allow]` exceptions. Now the severity is autogenerated from rustdoc output. Also support lints that change status between editions, and the `warnings` lint group.
2024-12-06Merge pull request #18625 from Veykril/push-npnxwpxuzlqzLukas Wirth-4/+71
fix: Fix parser getting stuck for bad asm expressions
2024-12-06fix: Fix parser getting stuck for bad asm expressionsLukas Wirth-4/+71
2024-12-05fix: Fix parsing of dyn T in generic arg on 2015 editionLukas Wirth-3/+68
2024-12-05Parse lifetime bounds in lifetime param into TypeBoundListLukas Wirth-38/+66
This mainly aids in error recovery but also makes it a bit easier to handle lifetime resolution. While doing so it also came apparent that we were not actually lowering lifetime outlives relationships within lifetime parameter declaration bounds, so this fixes that.
2024-12-05fix: Fix parsing of integer/keyword name refs in various placesLukas Wirth-132/+350
2024-12-04Fix parsing of parenthesized type args and RTNLukas Wirth-646/+920
2024-12-04fix: Don't create empty path nodesLukas Wirth-24/+26
2024-12-04Better parser recovery for incomplete attributesLukas Wirth-19/+130
2024-11-19Remove `TokenKind::InvalidPrefix`.Nicholas Nethercote-1/+1
It was added in #123752 to handle some cases involving emoji, but it isn't necessary because it's always treated the same as `TokenKind::InvalidIdent`. This commit removes it, which makes things a little simpler.
2024-10-31Parse patterns with leading pipe properly in all placesChayim Refael Friedman-16/+73
2024-10-30Only parse `safe` as contextual kw in extern blocksChayim Refael Friedman-8/+47
I don't like the party of `bool`s that is becoming, but two isn't worth a refactoring yet IMO.
2024-10-27Merge pull request #18419 from ChayimFriedman2/leading-orLukas Wirth-30/+67
fix: Put leading `|` in patterns under `OrPat`
2024-10-27Put leading `|` in patterns under `OrPat`Chayim Refael Friedman-30/+67
Previously it was one level above, and that caused problems with macros that expand to it, because macros expect to get only one top-level node.
2024-10-27Correctly handle `#""` in edition <2024Chayim Refael Friedman-7/+30
2024-10-22Auto merge of #18371 - Veykril:veykril/push-kwttrusywysp, r=Veykrilbors-10/+35
fix: Fix incorrect parsing of use bounds Fixes https://github.com/rust-lang/rust-analyzer/issues/18357
2024-10-22fix: Fix incorrect parsing of use boundsLukas Wirth-10/+35
Also lower them a bit more
2024-10-22Fix new nightly lintsLukas Wirth-3/+2
2024-10-21fix: classify `safe` as a contextual kwroife-7/+7
2024-10-20feat: initial support for safe_kw in extern blocksroife-1/+236
2024-10-17Bump rustc cratesLaurențiu Nicola-2/+3
2024-10-17Merge from rust-lang/rustLaurențiu Nicola-0/+6
2024-10-08Reserve guarded string literals (RFC 3593)Peter Jaszkowiak-0/+6
2024-10-01fix: correctly parse `use` in generic parametersSabrinaJewson-1/+29
2024-09-25Run rustfmtLaurențiu Nicola-3/+1
2024-09-25Merge from rust-lang/rustLaurențiu Nicola-0/+7
2024-09-06Fix toolsMichael Goulet-0/+7
2024-09-05fix: Fix parser panicking on invalid asm optionsLukas Wirth-0/+1
2024-09-05asm! parsing and lowering fixesLukas Wirth-7/+13
2024-09-05Give InlineAsmOperand a HIR representationLukas Wirth-29/+41
2024-09-05Add Definition kind for asm register operandLukas Wirth-18/+26
2024-09-05Lower asm expressionsLukas Wirth-21/+17
2024-09-04Parse builtin#asm expressionsLukas Wirth-10/+339
2024-09-04Add edition dependent keyword highlighting testsLukas Wirth-0/+6
2024-08-26Fix Return Type Syntax to include `..` (i.e. `method(..)` and not ↵Chayim Refael Friedman-15/+142
`method()`) as specified in the RFC
2024-08-16Properly account for editions in namesChayim Refael Friedman-0/+9
This PR touches a lot of parts. But the main changes are changing `hir_expand::Name` to be raw edition-dependently and only when necessary (unrelated to how the user originally wrote the identifier), and changing `is_keyword()` and `is_raw_identifier()` to be edition-aware (this was done in #17896, but the FIXMEs were fixed here). It is possible that I missed some cases, but most IDE parts should properly escape (or not escape) identifiers now. The rules of thumb are: - If we show the identifier to the user, its rawness should be determined by the edition of the edited crate. This is nice for IDE features, but really important for changes we insert to the source code. - For tests, I chose `Edition::CURRENT` (so we only have to (maybe) update tests when an edition becomes stable, to avoid churn). - For debugging tools (helper methods and logs), I used `Edition::LATEST`.
2024-08-15internal: Properly check the edition for edition dependent syntax kindsLukas Wirth-48/+120
2024-08-06Replace `[package.repository] = "…"` of published crates with ↵Vincent Esche-1/+1
`[package.repository.workspace] = true`
2024-08-06Add repository URL for published crates' missing `[package.repository]` fieldsVincent Esche-0/+1
2024-08-06Replace `"TBD"` with more helpful desciptions in published crates' ↵Vincent Esche-1/+1
`[package.description]` fields
2024-07-23fix: move `use` parsing to outer match armwinstxnhdw-18/+19
2024-07-23chore: update codegenswinstxnhdw-0/+73
2024-07-23feat: add arm for `use` type boundwinstxnhdw-0/+6
2024-07-20Add missing dyn parse special cases in 2015 editionLukas Wirth-70/+162
2024-07-19Fix edition used for include macro parsingLukas Wirth-1/+1
2024-07-19Parse contextual dyn keyword properly in edition 2015Lukas Wirth-8/+162
2024-07-19Prevent generated runner module from being format checkedLukas Wirth-0/+1
2024-07-19Parse `try` as a keyword only in edition 2018 and upLukas Wirth-39/+21
2024-07-19Add basic edition inline parser test supportLukas Wirth-153/+131