aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-15 20:25:53 +0000
committerGitHub <[email protected]>2019-11-15 20:25:53 +0000
commit920848940ae7b79b1655ac48a9e2c1694b9e06c8 (patch)
treecd0d39cd13ae0a9ee7299db575bea1a854cc0102 /crates/ra_hir_expand
parent86469d4195e7aeb93ae420d0c073593bfccc97f0 (diff)
parent4c90b7e2ecd03e739a3c92bbe5afd4c90fe2812d (diff)
Merge #2266
2266: Sourcify some things r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_expand')
-rw-r--r--crates/ra_hir_expand/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs
index 930789b0f..437d73e94 100644
--- a/crates/ra_hir_expand/src/lib.rs
+++ b/crates/ra_hir_expand/src/lib.rs
@@ -230,6 +230,10 @@ pub struct Source<T> {
230} 230}
231 231
232impl<T> Source<T> { 232impl<T> Source<T> {
233 pub fn new(file_id: HirFileId, ast: T) -> Source<T> {
234 Source { file_id, ast }
235 }
236
233 pub fn map<F: FnOnce(T) -> U, U>(self, f: F) -> Source<U> { 237 pub fn map<F: FnOnce(T) -> U, U>(self, f: F) -> Source<U> {
234 Source { file_id: self.file_id, ast: f(self.ast) } 238 Source { file_id: self.file_id, ast: f(self.ast) }
235 } 239 }