Rename LayoutCalculator::delay_bug as LayoutCalculator::delayed_bug.

To match with the previous commits.
This commit is contained in:
Nicholas Nethercote 2023-11-30 16:14:38 +11:00
parent c9008c6c8b
commit cb91235131
3 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@
pub trait LayoutCalculator {
type TargetDataLayoutRef: Borrow<TargetDataLayout>;
fn delay_bug(&self, txt: String);
fn delayed_bug(&self, txt: String);
fn current_data_layout(&self) -> Self::TargetDataLayoutRef;
fn scalar_pair<FieldIdx: Idx, VariantIdx: Idx>(
@ -792,7 +792,7 @@ fn layout_of_union<
let only_variant = &variants[VariantIdx::new(0)];
for field in only_variant {
if field.is_unsized() {
self.delay_bug("unsized field in union".to_string());
self.delayed_bug("unsized field in union".to_string());
}
align = align.max(field.align);
@ -1038,7 +1038,7 @@ fn univariant<
for &i in &inverse_memory_index {
let field = &fields[i];
if !sized {
this.delay_bug(format!(
this.delayed_bug(format!(
"univariant: field #{} comes after unsized field",
offsets.len(),
));

View File

@ -282,7 +282,7 @@ pub struct LayoutCx<'tcx, C> {
impl<'tcx> LayoutCalculator for LayoutCx<'tcx, TyCtxt<'tcx>> {
type TargetDataLayoutRef = &'tcx TargetDataLayout;
fn delay_bug(&self, txt: String) {
fn delayed_bug(&self, txt: String) {
self.tcx.sess.span_delayed_bug(DUMMY_SP, txt);
}

View File

@ -110,7 +110,7 @@ struct LayoutCx<'a> {
impl<'a> LayoutCalculator for LayoutCx<'a> {
type TargetDataLayoutRef = &'a TargetDataLayout;
fn delay_bug(&self, txt: String) {
fn delayed_bug(&self, txt: String) {
never!("{}", txt);
}