diff options
author | Aleksey Kladov <[email protected]> | 2018-11-07 15:32:33 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-11-07 15:42:36 +0000 |
commit | f8b36bbc3b968754b71844d942286e81415627b8 (patch) | |
tree | 72be8cc4bac951b00746291e4b357b86def7d4c7 /crates/ra_analysis/src/descriptors/function/scope.rs | |
parent | 2119fe214303325e86174b139d7ad8193b2ce251 (diff) |
Rename File -> SourceFileNode
Diffstat (limited to 'crates/ra_analysis/src/descriptors/function/scope.rs')
-rw-r--r-- | crates/ra_analysis/src/descriptors/function/scope.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/descriptors/function/scope.rs b/crates/ra_analysis/src/descriptors/function/scope.rs index 62b46ffba..bbe16947c 100644 --- a/crates/ra_analysis/src/descriptors/function/scope.rs +++ b/crates/ra_analysis/src/descriptors/function/scope.rs | |||
@@ -272,7 +272,7 @@ pub fn resolve_local_name<'a>( | |||
272 | #[cfg(test)] | 272 | #[cfg(test)] |
273 | mod tests { | 273 | mod tests { |
274 | use ra_editor::find_node_at_offset; | 274 | use ra_editor::find_node_at_offset; |
275 | use ra_syntax::File; | 275 | use ra_syntax::SourceFileNode; |
276 | use test_utils::extract_offset; | 276 | use test_utils::extract_offset; |
277 | 277 | ||
278 | use super::*; | 278 | use super::*; |
@@ -287,7 +287,7 @@ mod tests { | |||
287 | buf.push_str(&code[off..]); | 287 | buf.push_str(&code[off..]); |
288 | buf | 288 | buf |
289 | }; | 289 | }; |
290 | let file = File::parse(&code); | 290 | let file = SourceFileNode::parse(&code); |
291 | let marker: ast::PathExpr = find_node_at_offset(file.syntax(), off).unwrap(); | 291 | let marker: ast::PathExpr = find_node_at_offset(file.syntax(), off).unwrap(); |
292 | let fn_def: ast::FnDef = find_node_at_offset(file.syntax(), off).unwrap(); | 292 | let fn_def: ast::FnDef = find_node_at_offset(file.syntax(), off).unwrap(); |
293 | let scopes = FnScopes::new(fn_def); | 293 | let scopes = FnScopes::new(fn_def); |
@@ -376,7 +376,7 @@ mod tests { | |||
376 | 376 | ||
377 | fn do_check_local_name(code: &str, expected_offset: u32) { | 377 | fn do_check_local_name(code: &str, expected_offset: u32) { |
378 | let (off, code) = extract_offset(code); | 378 | let (off, code) = extract_offset(code); |
379 | let file = File::parse(&code); | 379 | let file = SourceFileNode::parse(&code); |
380 | let fn_def: ast::FnDef = find_node_at_offset(file.syntax(), off).unwrap(); | 380 | let fn_def: ast::FnDef = find_node_at_offset(file.syntax(), off).unwrap(); |
381 | let name_ref: ast::NameRef = find_node_at_offset(file.syntax(), off).unwrap(); | 381 | let name_ref: ast::NameRef = find_node_at_offset(file.syntax(), off).unwrap(); |
382 | 382 | ||