diff options
| author | Dan Aloni <alonid@gmail.com> | 2020-09-03 09:30:51 +0300 |
|---|---|---|
| committer | Dan Aloni <alonid@gmail.com> | 2020-09-03 09:41:43 +0300 |
| commit | c5a61319da34e931072f2ffe3d12e530034c8c07 (patch) | |
| tree | b56a6106ed83b5a051f7b6e1de7228593d7fbcd3 /compiler/rustc_driver/src | |
| parent | 07e7823c01be1733df2480de19fbbe6b8e9384cf (diff) | |
| download | rust-c5a61319da34e931072f2ffe3d12e530034c8c07.tar.gz rust-c5a61319da34e931072f2ffe3d12e530034c8c07.zip | |
rustc_driver: have TrimmedDefPaths::GoodPath only for rustc
`run_compiler` is used by clippy and other tools, which should not have the trimmed paths feature enabled by default, until we see it works well for them. Would also be nice to rename `TimePassesCallbacks` however it's a submodule change.
Diffstat (limited to 'compiler/rustc_driver/src')
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index d989d0041c5..c6e7553f35a 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -127,6 +127,7 @@ impl Callbacks for TimePassesCallbacks { // time because it will mess up the --prints output. See #64339. self.time_passes = config.opts.prints.is_empty() && (config.opts.debugging_opts.time_passes || config.opts.debugging_opts.time); + config.opts.trimmed_def_paths = TrimmedDefPaths::GoodPath; } } @@ -159,10 +160,7 @@ pub fn run_compiler( None => return Ok(()), }; - let sopts = config::Options { - trimmed_def_paths: TrimmedDefPaths::GoodPath, - ..config::build_session_options(&matches) - }; + let sopts = config::build_session_options(&matches); let cfg = interface::parse_cfgspecs(matches.opt_strs("cfg")); let mut dummy_config = |sopts, cfg, diagnostic_output| { |
