From f6c227babdeb2d6b6888b36ddcbd8eb220240fa2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 11 Jun 2019 18:11:17 +0300 Subject: fix compilation --- crates/ra_cli/src/analysis_stats.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_cli') 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}; use ra_db::SourceDatabase; use ra_batch::BatchDatabase; -use ra_hir::{Crate, ModuleDef, Ty, ImplItem}; +use ra_hir::{Crate, ModuleDef, Ty, ImplItem, HasSource}; use ra_syntax::AstNode; use crate::Result; @@ -64,10 +64,10 @@ pub fn run(verbose: bool, path: &str, only: Option<&str>) -> Result<()> { let name = f.name(&db); let mut msg = format!("processing: {}", name); if verbose { - let (file_id, source) = f.source(&db); - let original_file = file_id.original_file(&db); + let src = f.source(&db); + let original_file = src.file_id.original_file(&db); let path = db.file_relative_path(original_file); - let syntax_range = source.syntax().range(); + let syntax_range = src.ast.syntax().range(); write!(msg, " ({:?} {})", path, syntax_range).unwrap(); } bar.set_message(&msg); -- cgit v1.2.3