aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/expr')
-rw-r--r--crates/ra_hir/src/expr/scope.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs
index 48283907b..f1e6e0f02 100644
--- a/crates/ra_hir/src/expr/scope.rs
+++ b/crates/ra_hir/src/expr/scope.rs
@@ -294,9 +294,9 @@ pub struct ReferenceDescriptor {
294 294
295#[cfg(test)] 295#[cfg(test)]
296mod tests { 296mod tests {
297 use ra_db::salsa::InternKey;
297 use ra_syntax::{SourceFile, algo::find_node_at_offset}; 298 use ra_syntax::{SourceFile, algo::find_node_at_offset};
298 use test_utils::{extract_offset, assert_eq_text}; 299 use test_utils::{extract_offset, assert_eq_text};
299 use ra_arena::ArenaId;
300 use crate::Function; 300 use crate::Function;
301 301
302 use crate::expr::{ExprCollector}; 302 use crate::expr::{ExprCollector};
@@ -316,7 +316,8 @@ mod tests {
316 let file = SourceFile::parse(&code); 316 let file = SourceFile::parse(&code);
317 let marker: &ast::PathExpr = find_node_at_offset(file.syntax(), off).unwrap(); 317 let marker: &ast::PathExpr = find_node_at_offset(file.syntax(), off).unwrap();
318 let fn_def: &ast::FnDef = find_node_at_offset(file.syntax(), off).unwrap(); 318 let fn_def: &ast::FnDef = find_node_at_offset(file.syntax(), off).unwrap();
319 let irrelevant_function = Function { id: crate::ids::FunctionId::from_raw(0.into()) }; 319 let irrelevant_function =
320 Function { id: crate::ids::FunctionId::from_intern_id(0u32.into()) };
320 let (body, source_map) = collect_fn_body_syntax(irrelevant_function, fn_def); 321 let (body, source_map) = collect_fn_body_syntax(irrelevant_function, fn_def);
321 let scopes = ExprScopes::new(Arc::new(body)); 322 let scopes = ExprScopes::new(Arc::new(body));
322 let scopes = 323 let scopes =
@@ -421,7 +422,8 @@ mod tests {
421 let fn_def: &ast::FnDef = find_node_at_offset(file.syntax(), off).unwrap(); 422 let fn_def: &ast::FnDef = find_node_at_offset(file.syntax(), off).unwrap();
422 let name_ref: &ast::NameRef = find_node_at_offset(file.syntax(), off).unwrap(); 423 let name_ref: &ast::NameRef = find_node_at_offset(file.syntax(), off).unwrap();
423 424
424 let irrelevant_function = Function { id: crate::ids::FunctionId::from_raw(0.into()) }; 425 let irrelevant_function =
426 Function { id: crate::ids::FunctionId::from_intern_id(0u32.into()) };
425 let (body, source_map) = collect_fn_body_syntax(irrelevant_function, fn_def); 427 let (body, source_map) = collect_fn_body_syntax(irrelevant_function, fn_def);
426 let scopes = ExprScopes::new(Arc::new(body)); 428 let scopes = ExprScopes::new(Arc::new(body));
427 let scopes = 429 let scopes =