aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-21 13:13:45 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-21 13:13:45 +0000
commit5cacdfcb3c666161dc41f59228eaaca5cfe8fc27 (patch)
tree33fc9206a9ee2f2f1c64eeb85748bf5e9cd1c3f8 /crates/ra_ide_api
parent9be7426aae359d49ef272db74528a706e7f738a0 (diff)
parent7060a39d5c8dc2c72fe207536fee649ff615860f (diff)
Merge #872
872: simplify trait bounds r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs
index 57a490fa7..4b9fc9372 100644
--- a/crates/ra_ide_api/src/lib.rs
+++ b/crates/ra_ide_api/src/lib.rs
@@ -38,7 +38,7 @@ mod marks;
38 38
39use std::sync::Arc; 39use std::sync::Arc;
40 40
41use ra_syntax::{SourceFile, TreeArc, TextRange, TextUnit}; 41use ra_syntax::{SourceFile, TreeArc, TextRange, TextUnit, AstNode};
42use ra_text_edit::TextEdit; 42use ra_text_edit::TextEdit;
43use ra_db::{ 43use ra_db::{
44 SourceDatabase, CheckCanceled, 44 SourceDatabase, CheckCanceled,
@@ -244,8 +244,7 @@ impl Analysis {
244 /// Returns a syntax tree represented as `String`, for debug purposes. 244 /// Returns a syntax tree represented as `String`, for debug purposes.
245 // FIXME: use a better name here. 245 // FIXME: use a better name here.
246 pub fn syntax_tree(&self, file_id: FileId) -> String { 246 pub fn syntax_tree(&self, file_id: FileId) -> String {
247 let file = self.db.parse(file_id); 247 self.db.parse(file_id).syntax().debug_dump()
248 ra_ide_api_light::syntax_tree(&file)
249 } 248 }
250 249
251 /// Returns an edit to remove all newlines in the range, cleaning up minor 250 /// Returns an edit to remove all newlines in the range, cleaning up minor