Rename Handler::delay_good_path_bug
as Handler::good_path_delayed_bug
.
In line with the previous commits.
This commit is contained in:
parent
2c337a072c
commit
c9008c6c8b
6 changed files with 28 additions and 25 deletions
|
@ -551,12 +551,15 @@ impl Default for ErrorOutputType {
|
|||
/// Parameter to control path trimming.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
|
||||
pub enum TrimmedDefPaths {
|
||||
/// `try_print_trimmed_def_path` never prints a trimmed path and never calls the expensive query
|
||||
/// `try_print_trimmed_def_path` never prints a trimmed path and never calls the expensive
|
||||
/// query.
|
||||
#[default]
|
||||
Never,
|
||||
/// `try_print_trimmed_def_path` calls the expensive query, the query doesn't call `delay_good_path_bug`
|
||||
/// `try_print_trimmed_def_path` calls the expensive query, the query doesn't call
|
||||
/// `good_path_delayed_bug`.
|
||||
Always,
|
||||
/// `try_print_trimmed_def_path` calls the expensive query, the query calls `delay_good_path_bug`
|
||||
/// `try_print_trimmed_def_path` calls the expensive query, the query calls
|
||||
/// `good_path_delayed_bug`.
|
||||
GoodPath,
|
||||
}
|
||||
|
||||
|
|
|
@ -640,7 +640,7 @@ impl Session {
|
|||
/// Used for code paths of expensive computations that should only take place when
|
||||
/// warnings or errors are emitted. If no messages are emitted ("good path"), then
|
||||
/// it's likely a bug.
|
||||
pub fn delay_good_path_bug(&self, msg: impl Into<DiagnosticMessage>) {
|
||||
pub fn good_path_delayed_bug(&self, msg: impl Into<DiagnosticMessage>) {
|
||||
if self.opts.unstable_opts.print_type_sizes
|
||||
|| self.opts.unstable_opts.query_dep_graph
|
||||
|| self.opts.unstable_opts.dump_mir.is_some()
|
||||
|
@ -651,7 +651,7 @@ impl Session {
|
|||
return;
|
||||
}
|
||||
|
||||
self.diagnostic().delay_good_path_bug(msg)
|
||||
self.diagnostic().good_path_delayed_bug(msg)
|
||||
}
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
|
@ -883,7 +883,7 @@ impl Session {
|
|||
if fuel.remaining == 0 && !fuel.out_of_fuel {
|
||||
if self.diagnostic().can_emit_warnings() {
|
||||
// We only call `msg` in case we can actually emit warnings.
|
||||
// Otherwise, this could cause a `delay_good_path_bug` to
|
||||
// Otherwise, this could cause a `good_path_delayed_bug` to
|
||||
// trigger (issue #79546).
|
||||
self.emit_warning(errors::OptimisationFuelExhausted { msg: msg() });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue