diff options
| author | bors <bors@rust-lang.org> | 2023-12-06 11:47:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-06 11:47:46 +0000 |
| commit | cc8faa697c9b2963886bcf035ac0e98d70bd2b18 (patch) | |
| tree | f2e452958747cd4f724557c9f6274a5701a55bd1 /crates/proc-macro-api | |
| parent | 05df6c52cac9f5ce37a543a0b81d3bd6a1ec9d6d (diff) | |
| parent | 9cb13b6efb2578dedb8521cf9442c56df50f8d0b (diff) | |
Auto merge of #16034 - Veykril:ide-macro-improvements, r=Veykril
feat: Allow navigation targets to be duplicated when the focus range lies in the macro definition site  Basically if a name of an item originates from the macro definition we now point to that as well as the creating macro call. Big diff because I also made `FileId`s field private due to some debugging I had to do (having a searchable constructor makes things easier).
Diffstat (limited to 'crates/proc-macro-api')
| -rw-r--r-- | crates/proc-macro-api/src/msg.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/proc-macro-api/src/msg.rs b/crates/proc-macro-api/src/msg.rs index dd882d82fb6..1d3e45aff38 100644 --- a/crates/proc-macro-api/src/msg.rs +++ b/crates/proc-macro-api/src/msg.rs @@ -147,8 +147,10 @@ mod tests { use super::*; fn fixture_token_tree() -> Subtree<SpanData> { - let anchor = - SpanAnchor { file_id: FileId(0), ast_id: ErasedFileAstId::from_raw(RawIdx::from(0)) }; + let anchor = SpanAnchor { + file_id: FileId::from_raw(0), + ast_id: ErasedFileAstId::from_raw(RawIdx::from(0)), + }; let mut subtree = Subtree { delimiter: Delimiter { open: SpanData { |
