aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_cli/src')
-rw-r--r--crates/ra_cli/src/analysis_stats.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs
index d355fa2e8..5c0a9dd98 100644
--- a/crates/ra_cli/src/analysis_stats.rs
+++ b/crates/ra_cli/src/analysis_stats.rs
@@ -110,9 +110,12 @@ pub fn run(verbose: bool, memory_usage: bool, path: &Path, only: Option<&str>) -
110 let original_file = src.file_id.original_file(db); 110 let original_file = src.file_id.original_file(db);
111 let path = db.file_relative_path(original_file); 111 let path = db.file_relative_path(original_file);
112 let line_index = host.analysis().file_line_index(original_file).unwrap(); 112 let line_index = host.analysis().file_line_index(original_file).unwrap();
113 let text_range = src
114 .ast
115 .either(|it| it.syntax().text_range(), |it| it.syntax().text_range());
113 let (start, end) = ( 116 let (start, end) = (
114 line_index.line_col(src.ast.syntax().text_range().start()), 117 line_index.line_col(text_range.start()),
115 line_index.line_col(src.ast.syntax().text_range().end()), 118 line_index.line_col(text_range.end()),
116 ); 119 );
117 bar.println(format!( 120 bar.println(format!(
118 "{} {}:{}-{}:{}: Expected {}, got {}", 121 "{} {}:{}-{}:{}: Expected {}, got {}",