diff options
author | Aleksey Kladov <[email protected]> | 2018-10-31 12:13:49 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-31 12:13:49 +0000 |
commit | c02be1502c76cc504ccf7f73dce929585c94377c (patch) | |
tree | af21ab880f246e50209789614b45248d1f27ddd3 /crates/ra_analysis/src/syntax_ptr.rs | |
parent | b67295134bf5c518b39bc88abbe1bc5b9d7d3baf (diff) |
move resolve local name
Diffstat (limited to 'crates/ra_analysis/src/syntax_ptr.rs')
-rw-r--r-- | crates/ra_analysis/src/syntax_ptr.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_analysis/src/syntax_ptr.rs b/crates/ra_analysis/src/syntax_ptr.rs index aee214318..563a010d7 100644 --- a/crates/ra_analysis/src/syntax_ptr.rs +++ b/crates/ra_analysis/src/syntax_ptr.rs | |||
@@ -84,6 +84,10 @@ impl LocalSyntaxPtr { | |||
84 | .unwrap_or_else(|| panic!("can't resovle local ptr to SyntaxNode: {:?}", self)) | 84 | .unwrap_or_else(|| panic!("can't resovle local ptr to SyntaxNode: {:?}", self)) |
85 | } | 85 | } |
86 | } | 86 | } |
87 | |||
88 | pub(crate) fn into_global(self, file_id: FileId) -> SyntaxPtr { | ||
89 | SyntaxPtr { file_id, local: self} | ||
90 | } | ||
87 | } | 91 | } |
88 | 92 | ||
89 | 93 | ||