mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
PR issuse resolved
This commit is contained in:
parent
ef02c3c038
commit
9b73f80959
9 changed files with 30 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
|||
mod analysis_stats;
|
||||
|
||||
use std::{fs, io::Read, path::Path, time::Instant};
|
||||
use std::{fs, io::Read, path::Path};
|
||||
|
||||
use clap::{App, Arg, SubCommand};
|
||||
use join_to_string::join;
|
||||
|
@ -9,6 +9,7 @@ use ra_ide_api_light::file_structure;
|
|||
use ra_syntax::{SourceFile, TextRange, TreeArc, AstNode};
|
||||
use tools::collect_tests;
|
||||
use flexi_logger::Logger;
|
||||
use ra_prof::profile;
|
||||
|
||||
type Result<T> = ::std::result::Result<T, failure::Error>;
|
||||
|
||||
|
@ -34,13 +35,11 @@ fn main() -> Result<()> {
|
|||
.get_matches();
|
||||
match matches.subcommand() {
|
||||
("parse", Some(matches)) => {
|
||||
let start = Instant::now();
|
||||
let _p = profile("parsing");
|
||||
let file = file()?;
|
||||
let elapsed = start.elapsed();
|
||||
if !matches.is_present("no-dump") {
|
||||
println!("{}", file.syntax().debug_dump());
|
||||
}
|
||||
eprintln!("parsing: {:?}", elapsed);
|
||||
::std::mem::forget(file);
|
||||
}
|
||||
("symbols", _) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue