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/base-db/src/input.rs | |
| 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/base-db/src/input.rs')
| -rw-r--r-- | crates/base-db/src/input.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/base-db/src/input.rs b/crates/base-db/src/input.rs index 12b449932dd..c2472363aac 100644 --- a/crates/base-db/src/input.rs +++ b/crates/base-db/src/input.rs @@ -880,7 +880,7 @@ mod tests { fn detect_cyclic_dependency_indirect() { let mut graph = CrateGraph::default(); let crate1 = graph.add_crate_root( - FileId(1u32), + FileId::from_raw(1u32), Edition2018, None, None, @@ -893,7 +893,7 @@ mod tests { None, ); let crate2 = graph.add_crate_root( - FileId(2u32), + FileId::from_raw(2u32), Edition2018, None, None, @@ -906,7 +906,7 @@ mod tests { None, ); let crate3 = graph.add_crate_root( - FileId(3u32), + FileId::from_raw(3u32), Edition2018, None, None, @@ -942,7 +942,7 @@ mod tests { fn detect_cyclic_dependency_direct() { let mut graph = CrateGraph::default(); let crate1 = graph.add_crate_root( - FileId(1u32), + FileId::from_raw(1u32), Edition2018, None, None, @@ -955,7 +955,7 @@ mod tests { None, ); let crate2 = graph.add_crate_root( - FileId(2u32), + FileId::from_raw(2u32), Edition2018, None, None, @@ -985,7 +985,7 @@ mod tests { fn it_works() { let mut graph = CrateGraph::default(); let crate1 = graph.add_crate_root( - FileId(1u32), + FileId::from_raw(1u32), Edition2018, None, None, @@ -998,7 +998,7 @@ mod tests { None, ); let crate2 = graph.add_crate_root( - FileId(2u32), + FileId::from_raw(2u32), Edition2018, None, None, @@ -1011,7 +1011,7 @@ mod tests { None, ); let crate3 = graph.add_crate_root( - FileId(3u32), + FileId::from_raw(3u32), Edition2018, None, None, @@ -1041,7 +1041,7 @@ mod tests { fn dashes_are_normalized() { let mut graph = CrateGraph::default(); let crate1 = graph.add_crate_root( - FileId(1u32), + FileId::from_raw(1u32), Edition2018, None, None, @@ -1054,7 +1054,7 @@ mod tests { None, ); let crate2 = graph.add_crate_root( - FileId(2u32), + FileId::from_raw(2u32), Edition2018, None, None, |
