mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Allow targeting a specific function with analysis-stats
This can be useful for debugging.
This commit is contained in:
parent
4083caa233
commit
880ef25a9e
2 changed files with 12 additions and 4 deletions
|
@ -23,7 +23,9 @@ fn main() -> Result<()> {
|
|||
.subcommand(SubCommand::with_name("parse").arg(Arg::with_name("no-dump").long("--no-dump")))
|
||||
.subcommand(SubCommand::with_name("symbols"))
|
||||
.subcommand(
|
||||
SubCommand::with_name("analysis-stats").arg(Arg::with_name("verbose").short("v")),
|
||||
SubCommand::with_name("analysis-stats")
|
||||
.arg(Arg::with_name("verbose").short("v"))
|
||||
.arg(Arg::with_name("only").short("o").takes_value(true)),
|
||||
)
|
||||
.get_matches();
|
||||
match matches.subcommand() {
|
||||
|
@ -51,7 +53,8 @@ fn main() -> Result<()> {
|
|||
}
|
||||
("analysis-stats", Some(matches)) => {
|
||||
let verbose = matches.is_present("verbose");
|
||||
analysis_stats::run(verbose)?;
|
||||
let only = matches.value_of("only");
|
||||
analysis_stats::run(verbose, only)?;
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue