aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-03 11:38:47 +0100
committerGitHub <[email protected]>2019-09-03 11:38:47 +0100
commit1c0672b7f802c7e7814ba9a1b3b21ecf866343d6 (patch)
treedf19e2603745c348e2e5d8289be80c2f511b0b0d /crates/ra_cli
parentf5b60a53f68100937d561acae51e06b5ebb6bd18 (diff)
parent9c3b25177e3c8d609dd24d2c2e01cbb82cab665f (diff)
Merge #1756
1756: Correctly build BodySourceMap for macro-expanded expressions r=flodiebold a=matklad r? @flodiebold Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_cli')
-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 {}",