aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-06-11 16:29:42 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-06-11 16:29:42 +0100
commit80aa9d5f9f55341d2a51176e385d8aa6d2d2cec8 (patch)
treeb6fee9faf5f82ba6ee063667605e39ac3bcbe37c /crates/ra_cli/src
parente505fe9d7b96f3454711e923c70d763c5cee5f47 (diff)
parentff6f6b3a5223ddab81c7357a3c59bdb09936a552 (diff)
Merge #1395
1395: move docs under code model r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_cli/src')
-rw-r--r--crates/ra_cli/src/analysis_stats.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs
index 8bb524ce3..c19976bd2 100644
--- a/crates/ra_cli/src/analysis_stats.rs
+++ b/crates/ra_cli/src/analysis_stats.rs
@@ -2,7 +2,7 @@ use std::{collections::HashSet, time::Instant, fmt::Write};
2 2
3use ra_db::SourceDatabase; 3use ra_db::SourceDatabase;
4use ra_batch::BatchDatabase; 4use ra_batch::BatchDatabase;
5use ra_hir::{Crate, ModuleDef, Ty, ImplItem}; 5use ra_hir::{Crate, ModuleDef, Ty, ImplItem, HasSource};
6use ra_syntax::AstNode; 6use ra_syntax::AstNode;
7 7
8use crate::Result; 8use crate::Result;
@@ -64,10 +64,10 @@ pub fn run(verbose: bool, path: &str, only: Option<&str>) -> Result<()> {
64 let name = f.name(&db); 64 let name = f.name(&db);
65 let mut msg = format!("processing: {}", name); 65 let mut msg = format!("processing: {}", name);
66 if verbose { 66 if verbose {
67 let (file_id, source) = f.source(&db); 67 let src = f.source(&db);
68 let original_file = file_id.original_file(&db); 68 let original_file = src.file_id.original_file(&db);
69 let path = db.file_relative_path(original_file); 69 let path = db.file_relative_path(original_file);
70 let syntax_range = source.syntax().range(); 70 let syntax_range = src.ast.syntax().range();
71 write!(msg, " ({:?} {})", path, syntax_range).unwrap(); 71 write!(msg, " ({:?} {})", path, syntax_range).unwrap();
72 } 72 }
73 bar.set_message(&msg); 73 bar.set_message(&msg);