Skip to content

diagnostics: shorten paths of unique symbols #73996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 4, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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.
  • Loading branch information
da-x committed Sep 3, 2020
commit c5a61319da34e931072f2ffe3d12e530034c8c07
6 changes: 2 additions & 4 deletions compiler/rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should tools not have trimmed paths enabled?

let cfg = interface::parse_cfgspecs(matches.opt_strs("cfg"));

let mut dummy_config = |sopts, cfg, diagnostic_output| {
Expand Down