aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-06-11 16:29:42 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-06-11 16:29:42 +0100
commit80aa9d5f9f55341d2a51176e385d8aa6d2d2cec8 (patch)
treeb6fee9faf5f82ba6ee063667605e39ac3bcbe37c /crates/ra_hir/src/expr.rs
parente505fe9d7b96f3454711e923c70d763c5cee5f47 (diff)
parentff6f6b3a5223ddab81c7357a3c59bdb09936a552 (diff)
Merge #1395
1395: move docs under code model r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r--crates/ra_hir/src/expr.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index 012f374ec..b1973d19d 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -11,6 +11,7 @@ use ra_syntax::{
11 11
12use crate::{ 12use crate::{
13 Path, Name, HirDatabase, Resolver,DefWithBody, Either, HirFileId, MacroCallLoc, MacroFileKind, 13 Path, Name, HirDatabase, Resolver,DefWithBody, Either, HirFileId, MacroCallLoc, MacroFileKind,
14 HasSource,
14 name::AsName, 15 name::AsName,
15 type_ref::{Mutability, TypeRef}, 16 type_ref::{Mutability, TypeRef},
16}; 17};
@@ -1018,19 +1019,19 @@ pub(crate) fn body_with_source_map_query(
1018 1019
1019 match def { 1020 match def {
1020 DefWithBody::Const(ref c) => { 1021 DefWithBody::Const(ref c) => {
1021 let (file_id, src) = c.source(db); 1022 let src = c.source(db);
1022 collector = ExprCollector::new(def, file_id, def.resolver(db), db); 1023 collector = ExprCollector::new(def, src.file_id, def.resolver(db), db);
1023 collector.collect_const_body(&src) 1024 collector.collect_const_body(&src.ast)
1024 } 1025 }
1025 DefWithBody::Function(ref f) => { 1026 DefWithBody::Function(ref f) => {
1026 let (file_id, src) = f.source(db); 1027 let src = f.source(db);
1027 collector = ExprCollector::new(def, file_id, def.resolver(db), db); 1028 collector = ExprCollector::new(def, src.file_id, def.resolver(db), db);
1028 collector.collect_fn_body(&src) 1029 collector.collect_fn_body(&src.ast)
1029 } 1030 }
1030 DefWithBody::Static(ref s) => { 1031 DefWithBody::Static(ref s) => {
1031 let (file_id, src) = s.source(db); 1032 let src = s.source(db);
1032 collector = ExprCollector::new(def, file_id, def.resolver(db), db); 1033 collector = ExprCollector::new(def, src.file_id, def.resolver(db), db);
1033 collector.collect_static_body(&src) 1034 collector.collect_static_body(&src.ast)
1034 } 1035 }
1035 } 1036 }
1036 1037