1
Fork 0

Rename Handler::delay_good_path_bug as Handler::good_path_delayed_bug.

In line with the previous commits.
This commit is contained in:
Nicholas Nethercote 2023-11-30 16:05:50 +11:00
parent 2c337a072c
commit c9008c6c8b
6 changed files with 28 additions and 25 deletions

View file

@ -284,9 +284,9 @@ impl<'tcx> fmt::Display for FrameInfo<'tcx> {
{
write!(f, "inside closure")
} else {
// Note: this triggers a `good_path_bug` state, which means that if we ever get here
// we must emit a diagnostic. We should never display a `FrameInfo` unless we
// actually want to emit a warning or error to the user.
// Note: this triggers a `good_path_delayed_bug` state, which means that if we ever
// get here we must emit a diagnostic. We should never display a `FrameInfo` unless
// we actually want to emit a warning or error to the user.
write!(f, "inside `{}`", self.instance)
}
})
@ -300,8 +300,8 @@ impl<'tcx> FrameInfo<'tcx> {
errors::FrameNote { where_: "closure", span, instance: String::new(), times: 0 }
} else {
let instance = format!("{}", self.instance);
// Note: this triggers a `good_path_bug` state, which means that if we ever get here
// we must emit a diagnostic. We should never display a `FrameInfo` unless we
// Note: this triggers a `good_path_delayed_bug` state, which means that if we ever get
// here we must emit a diagnostic. We should never display a `FrameInfo` unless we
// actually want to emit a warning or error to the user.
errors::FrameNote { where_: "instance", span, instance, times: 0 }
}