diff options
author | Aleksey Kladov <[email protected]> | 2019-06-11 16:11:17 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-06-11 16:28:51 +0100 |
commit | f6c227babdeb2d6b6888b36ddcbd8eb220240fa2 (patch) | |
tree | 525494d466f92c975d2343f54411606f388135e9 /crates/ra_cli | |
parent | 14b1f8763486fe7bc4a468c70fce827ae34d3d74 (diff) |
fix compilation
Diffstat (limited to 'crates/ra_cli')
-rw-r--r-- | crates/ra_cli/src/analysis_stats.rs | 8 |
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 | ||
3 | use ra_db::SourceDatabase; | 3 | use ra_db::SourceDatabase; |
4 | use ra_batch::BatchDatabase; | 4 | use ra_batch::BatchDatabase; |
5 | use ra_hir::{Crate, ModuleDef, Ty, ImplItem}; | 5 | use ra_hir::{Crate, ModuleDef, Ty, ImplItem, HasSource}; |
6 | use ra_syntax::AstNode; | 6 | use ra_syntax::AstNode; |
7 | 7 | ||
8 | use crate::Result; | 8 | use 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); |