diff options
Diffstat (limited to 'crates/ra_hir/src/expr/scope.rs')
-rw-r--r-- | crates/ra_hir/src/expr/scope.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs index 58f365128..83d226fc1 100644 --- a/crates/ra_hir/src/expr/scope.rs +++ b/crates/ra_hir/src/expr/scope.rs | |||
@@ -190,7 +190,7 @@ mod tests { | |||
190 | }; | 190 | }; |
191 | 191 | ||
192 | let (db, _source_root, file_id) = MockDatabase::with_single_file(&code); | 192 | let (db, _source_root, file_id) = MockDatabase::with_single_file(&code); |
193 | let file = db.parse(file_id); | 193 | let file = db.parse(file_id).ok().unwrap(); |
194 | let marker: &ast::PathExpr = find_node_at_offset(file.syntax(), off).unwrap(); | 194 | let marker: &ast::PathExpr = find_node_at_offset(file.syntax(), off).unwrap(); |
195 | let analyzer = SourceAnalyzer::new(&db, file_id, marker.syntax(), None); | 195 | let analyzer = SourceAnalyzer::new(&db, file_id, marker.syntax(), None); |
196 | 196 | ||
@@ -288,7 +288,7 @@ mod tests { | |||
288 | let (off, code) = extract_offset(code); | 288 | let (off, code) = extract_offset(code); |
289 | 289 | ||
290 | let (db, _source_root, file_id) = MockDatabase::with_single_file(&code); | 290 | let (db, _source_root, file_id) = MockDatabase::with_single_file(&code); |
291 | let file = db.parse(file_id); | 291 | let file = db.parse(file_id).ok().unwrap(); |
292 | let expected_name = find_node_at_offset::<ast::Name>(file.syntax(), expected_offset.into()) | 292 | let expected_name = find_node_at_offset::<ast::Name>(file.syntax(), expected_offset.into()) |
293 | .expect("failed to find a name at the target offset"); | 293 | .expect("failed to find a name at the target offset"); |
294 | let name_ref: &ast::NameRef = find_node_at_offset(file.syntax(), off).unwrap(); | 294 | let name_ref: &ast::NameRef = find_node_at_offset(file.syntax(), off).unwrap(); |