aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/display
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-28 16:46:11 +0100
committerAleksey Kladov <[email protected]>2019-05-28 16:46:11 +0100
commit61e1474ab35deb7d54cc2f5d710b901f200b6467 (patch)
tree158afa2f165a70fdcb5870c940cc9653854e59fa /crates/ra_ide_api/src/display
parentc8bcfe6a05d82e151d459bcd2bd8a7b2742f7a66 (diff)
fix typos in mbe tests
Diffstat (limited to 'crates/ra_ide_api/src/display')
-rw-r--r--crates/ra_ide_api/src/display/navigation_target.rs4
-rw-r--r--crates/ra_ide_api/src/display/structure.rs4
2 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs
index 7f81483f7..ae729614f 100644
--- a/crates/ra_ide_api/src/display/navigation_target.rs
+++ b/crates/ra_ide_api/src/display/navigation_target.rs
@@ -79,7 +79,7 @@ impl NavigationTarget {
79 file_id: FileId, 79 file_id: FileId,
80 pat: AstPtr<ast::Pat>, 80 pat: AstPtr<ast::Pat>,
81 ) -> NavigationTarget { 81 ) -> NavigationTarget {
82 let file = db.parse(file_id); 82 let file = db.parse(file_id).tree;
83 let (name, full_range) = match pat.to_node(file.syntax()).kind() { 83 let (name, full_range) = match pat.to_node(file.syntax()).kind() {
84 ast::PatKind::BindPat(pat) => return NavigationTarget::from_bind_pat(file_id, &pat), 84 ast::PatKind::BindPat(pat) => return NavigationTarget::from_bind_pat(file_id, &pat),
85 _ => ("_".into(), pat.syntax_node_ptr().range()), 85 _ => ("_".into(), pat.syntax_node_ptr().range()),
@@ -290,7 +290,7 @@ impl NavigationTarget {
290 } 290 }
291 291
292 pub(crate) fn node(&self, db: &RootDatabase) -> Option<TreeArc<SyntaxNode>> { 292 pub(crate) fn node(&self, db: &RootDatabase) -> Option<TreeArc<SyntaxNode>> {
293 let source_file = db.parse(self.file_id()); 293 let source_file = db.parse(self.file_id()).tree;
294 let source_file = source_file.syntax(); 294 let source_file = source_file.syntax();
295 let node = source_file 295 let node = source_file
296 .descendants() 296 .descendants()
diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide_api/src/display/structure.rs
index ec2c9bbc6..24ab7b59c 100644
--- a/crates/ra_ide_api/src/display/structure.rs
+++ b/crates/ra_ide_api/src/display/structure.rs
@@ -183,7 +183,9 @@ fn obsolete() {}
183#[deprecated(note = "for awhile")] 183#[deprecated(note = "for awhile")]
184fn very_obsolete() {} 184fn very_obsolete() {}
185"#, 185"#,
186 ); 186 )
187 .ok()
188 .unwrap();
187 let structure = file_structure(&file); 189 let structure = file_structure(&file);
188 assert_debug_snapshot_matches!("file_structure", structure); 190 assert_debug_snapshot_matches!("file_structure", structure);
189 } 191 }