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 1f2750d89..45555be6e 100644
--- a/crates/ra_cli/src/main.rs
+++ b/crates/ra_cli/src/main.rs
@@ -1,12 +1,13 @@
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 ra_ide_api::file_structure; 6use ra_ide_api::file_structure;
7use ra_syntax::{SourceFile, TreeArc, AstNode}; 7use ra_syntax::{SourceFile, TreeArc, AstNode};
8use tools::collect_tests; 8use tools::collect_tests;
9use flexi_logger::Logger; 9use flexi_logger::Logger;
10use ra_prof::profile;
10 11
11type Result<T> = ::std::result::Result<T, failure::Error>; 12type Result<T> = ::std::result::Result<T, failure::Error>;
12 13
@@ -27,13 +28,11 @@ fn main() -> Result<()> {
27 .get_matches(); 28 .get_matches();
28 match matches.subcommand() { 29 match matches.subcommand() {
29 ("parse", Some(matches)) => { 30 ("parse", Some(matches)) => {
30 let start = Instant::now(); 31 let _p = profile("parsing");
31 let file = file()?; 32 let file = file()?;
32 let elapsed = start.elapsed();
33 if !matches.is_present("no-dump") { 33 if !matches.is_present("no-dump") {
34 println!("{}", file.syntax().debug_dump()); 34 println!("{}", file.syntax().debug_dump());
35 } 35 }
36 eprintln!("parsing: {:?}", elapsed);
37 ::std::mem::forget(file); 36 ::std::mem::forget(file);
38 } 37 }
39 ("symbols", _) => { 38 ("symbols", _) => {