aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_cli')
-rw-r--r--crates/ra_cli/Cargo.toml1
-rw-r--r--crates/ra_cli/src/main.rs7
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml
index 467628236..328b2436f 100644
--- a/crates/ra_cli/Cargo.toml
+++ b/crates/ra_cli/Cargo.toml
@@ -18,3 +18,4 @@ tools = { path = "../tools" }
18ra_batch = { path = "../ra_batch" } 18ra_batch = { path = "../ra_batch" }
19ra_hir = { path = "../ra_hir" } 19ra_hir = { path = "../ra_hir" }
20ra_db = { path = "../ra_db" } 20ra_db = { path = "../ra_db" }
21ra_prof = { path = "../ra_prof" }
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs
index 11f5541eb..ecea516f1 100644
--- a/crates/ra_cli/src/main.rs
+++ b/crates/ra_cli/src/main.rs
@@ -1,6 +1,6 @@
1mod analysis_stats; 1mod analysis_stats;
2 2
3use std::{fs, io::Read, path::Path, time::Instant}; 3use std::{fs, io::Read, path::Path};
4 4
5use clap::{App, Arg, SubCommand}; 5use clap::{App, Arg, SubCommand};
6use join_to_string::join; 6use join_to_string::join;
@@ -9,6 +9,7 @@ use ra_ide_api::file_structure;
9use ra_syntax::{SourceFile, TextRange, TreeArc, AstNode}; 9use ra_syntax::{SourceFile, TextRange, TreeArc, AstNode};
10use tools::collect_tests; 10use tools::collect_tests;
11use flexi_logger::Logger; 11use flexi_logger::Logger;
12use ra_prof::profile;
12 13
13type Result<T> = ::std::result::Result<T, failure::Error>; 14type Result<T> = ::std::result::Result<T, failure::Error>;
14 15
@@ -34,13 +35,11 @@ fn main() -> Result<()> {
34 .get_matches(); 35 .get_matches();
35 match matches.subcommand() { 36 match matches.subcommand() {
36 ("parse", Some(matches)) => { 37 ("parse", Some(matches)) => {
37 let start = Instant::now(); 38 let _p = profile("parsing");
38 let file = file()?; 39 let file = file()?;
39 let elapsed = start.elapsed();
40 if !matches.is_present("no-dump") { 40 if !matches.is_present("no-dump") {
41 println!("{}", file.syntax().debug_dump()); 41 println!("{}", file.syntax().debug_dump());
42 } 42 }
43 eprintln!("parsing: {:?}", elapsed);
44 ::std::mem::forget(file); 43 ::std::mem::forget(file);
45 } 44 }
46 ("symbols", _) => { 45 ("symbols", _) => {