diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-07 18:37:47 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-07 18:37:47 +0100 |
commit | 70cd5ffbf5f2283fc4986c581d225987620b5335 (patch) | |
tree | 10d66df8729d3bd823ace808f3a05146a32d4ed4 /crates/ra_cli/src/main.rs | |
parent | d3efedb752bb2198796603d8a479a5e3ee472a97 (diff) | |
parent | 530b3047ed19a6468fc75e5a5ec14763093a069d (diff) |
Merge #1251
1251: Chalk integration improvements r=matklad a=flodiebold
A few improvements that came up while working on where clause support:
- turn `implements` into a query again to improve performance
- allow skipping to a specific function with `analysis-stats`, e.g. `ra_cli analysis-stats --only world_symbols`
- deduplicate impls in impls_for_trait -- previously many impls e.g. from std where repeated many times, this should help performance as well...
- add a `HirDisplay` implementation for TraitRef (not used here anywhere, but useful for debugging)
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_cli/src/main.rs')
-rw-r--r-- | crates/ra_cli/src/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index 45555be6e..11790d2e7 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs | |||
@@ -23,7 +23,9 @@ fn main() -> Result<()> { | |||
23 | .subcommand(SubCommand::with_name("parse").arg(Arg::with_name("no-dump").long("--no-dump"))) | 23 | .subcommand(SubCommand::with_name("parse").arg(Arg::with_name("no-dump").long("--no-dump"))) |
24 | .subcommand(SubCommand::with_name("symbols")) | 24 | .subcommand(SubCommand::with_name("symbols")) |
25 | .subcommand( | 25 | .subcommand( |
26 | SubCommand::with_name("analysis-stats").arg(Arg::with_name("verbose").short("v")), | 26 | SubCommand::with_name("analysis-stats") |
27 | .arg(Arg::with_name("verbose").short("v")) | ||
28 | .arg(Arg::with_name("only").short("o").takes_value(true)), | ||
27 | ) | 29 | ) |
28 | .get_matches(); | 30 | .get_matches(); |
29 | match matches.subcommand() { | 31 | match matches.subcommand() { |
@@ -51,7 +53,8 @@ fn main() -> Result<()> { | |||
51 | } | 53 | } |
52 | ("analysis-stats", Some(matches)) => { | 54 | ("analysis-stats", Some(matches)) => { |
53 | let verbose = matches.is_present("verbose"); | 55 | let verbose = matches.is_present("verbose"); |
54 | analysis_stats::run(verbose)?; | 56 | let only = matches.value_of("only"); |
57 | analysis_stats::run(verbose, only)?; | ||
55 | } | 58 | } |
56 | _ => unreachable!(), | 59 | _ => unreachable!(), |
57 | } | 60 | } |