about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/span
AgeCommit message (Collapse)AuthorLines
2025-07-31`cargo clippy --fix`Lukas Wirth-7/+7
2025-07-30Abtract away json protocol for proc-macro-srvLukas Wirth-12/+0
2025-07-09Make `AsmExpr` have `AstId`Chayim Refael Friedman-10/+29
We need it because `global_asm!()` is an item. It's unfortunate that such thing can slip in and I see no way to automatically catch that, but thankfully analysis-stats on self has caught that.
2025-07-09Don't hash the `SyntaxKind` in the ast idChayim Refael Friedman-6/+1
There is no need to, it's already stored in the `kind`.
2025-07-03Bump salsaLukas Wirth-12/+19
2025-06-12Support spans with proc macro servers from before the ast id changesChayim Refael Friedman-3/+4
The only thing changed is the value of the fixup ast id, so we just swap it.
2025-06-12Use stable AST IDsChayim Refael Friedman-160/+772
Instead of simple numbering, we hash important bits, like the name of the item. This will allow for much better incrementality, e.g. when you add an item. Currently, this invalidates the IDs of all following items, which invalidates pretty much everything.
2025-05-30Add some more `hir_expand::files` conversionsLukas Wirth-1/+4
2025-04-29Update salsaLukas Wirth-7/+2
2025-04-29refactor: Remove unnecessary extension traitLukas Wirth-1/+55
2025-04-25Switch `AstIdMap` to `hashbrown::HashTable` from the raw APIChayim Refael Friedman-10/+10
It's the intended use.
2025-04-22Account for `IngredientCache::get_or_create()` taking `&Zalsa` and not `&dyn ↵Chayim Refael Friedman-1/+1
Database`
2025-04-22Adjust for `salsa::Id::from_u32()` being unsafeChayim Refael Friedman-179/+72
This impacts our manual `salsa::Id` wrappers. I refactored them a bit to improve safety.
2025-04-19Make `HirFileId`, `EditionedFileId` and macro files Salsa structChayim Refael Friedman-61/+5
And make more queries non-interned. Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-03-27chore: Remove salsa dependency from proc-macro server againLukas Wirth-12/+59
2025-03-16internal: Render root syntax contexts more clearlyLukas Wirth-2/+6
2025-03-15cargo fmtBenjaminBrienen-3/+3
2025-03-15chore: Remove legacy `SyntaxContextId` re-exportLukas Wirth-25/+18
2025-03-10internal: port rust-analyzer to new SalsaDavid Barsky-186/+335
2025-01-09Make edition per-token, not per-fileChayim Refael Friedman-10/+21
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
2024-12-30Decouple proc-macro server protocol from the server implementationLukas Wirth-0/+12
2024-12-20internal: Split serde derive feature into `serde_derive` usageLukas Wirth-1/+3
Ideally we'd not have any dependency pull in the derive feature for faster build times, once that is the case this change would have an actual effect. See https://github.com/matklad/macro-dep-test/blob/master/README.md for context.
2024-12-18Remove salsa from proc-macro server dep treeLukas Wirth-1/+78
2024-10-23internal: log original syntax on panicDavid Barsky-1/+2
2024-10-14chore: rename salsa to ra_salsaDavid Barsky-10/+10
2024-10-04internal: Filter out opaque tokens in some of IDE feature macro descensionsLukas Wirth-4/+16
2024-09-23Fix a bug in span map merge, and add explanations of how span maps are storedChayim Refael Friedman-2/+24
Because it took me hours to figure out that contrary to common sense, the offset stored is the *end* of the node, and we search by the *start*. Which is why we need a convoluted `partition_point()` instead of a simple `binary_search()`. And this was not documented at all. Which made me make mistakes with my implementation of `SpanMap::merge()`. The other bug fixed about span map merging is correctly keeping track of the current offset in presence of multiple sibling macro invocations. Unrelated, but because of the previous issue it took me hours to debug, so I figured out I'll put them together for posterity.
2024-09-18Get rid of `$crate` in expansions shown to the userChayim Refael Friedman-0/+25
Be it "Expand Macro Recursively", "Inline macro" or few other things. We replace it with the crate name, as should've always been.
2024-09-02chore: fix some commentscuishuang-1/+1
Signed-off-by: cuishuang <imcusg@gmail.com>
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-08-05Auto merge of #17799 - Veykril:syntax-bridge, r=Veykrilbors-0/+4
Split out syntax-bridge into a separate crate This functionality is not really tied to mbe macros, so imo it has no place in that crate.
2024-08-05Newtype ErasedFileAstIdLukas Wirth-12/+36
2024-08-05Split out syntax-bridge into a separate crateLukas Wirth-0/+4
2024-07-29Fix error spans for include! and compile_error!Lukas Wirth-0/+10
2024-07-25Remove Params and Fields from AstIdMapLukas Wirth-4/+2
2024-07-18Encode edition within FileId in the hir layerLukas Wirth-35/+124
2024-06-13internal: Fix rustdoc warningsWilfred Hughes-1/+1
`cargo doc` generates a bunch of warnings on rust-analyzer. Fix all the bare URL and empty code block warnings.
2024-06-12internal: Remove FileId::BOGUSLukas Wirth-9/+2
2024-05-30style: simplify string interpolationHamir Mahal-1/+1
2024-04-21Allow rust files to be used linkedProjectsLukas Wirth-0/+848