Skip to content

Commit c5a6131

Browse files
committed
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.
1 parent 07e7823 commit c5a6131

File tree

1 file changed

+2
-4
lines changed
  • compiler/rustc_driver/src

1 file changed

+2
-4
lines changed

compiler/rustc_driver/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ impl Callbacks for TimePassesCallbacks {
127127
// time because it will mess up the --prints output. See #64339.
128128
self.time_passes = config.opts.prints.is_empty()
129129
&& (config.opts.debugging_opts.time_passes || config.opts.debugging_opts.time);
130+
config.opts.trimmed_def_paths = TrimmedDefPaths::GoodPath;
130131
}
131132
}
132133

@@ -159,10 +160,7 @@ pub fn run_compiler(
159160
None => return Ok(()),
160161
};
161162

162-
let sopts = config::Options {
163-
trimmed_def_paths: TrimmedDefPaths::GoodPath,
164-
..config::build_session_options(&matches)
165-
};
163+
let sopts = config::build_session_options(&matches);
166164
let cfg = interface::parse_cfgspecs(matches.opt_strs("cfg"));
167165

168166
let mut dummy_config = |sopts, cfg, diagnostic_output| {

0 commit comments

Comments
 (0)