diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-30 16:14:38 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-02 09:01:34 +1100 |
| commit | cb912351313bcacc9ee0d50414c3005635802ec9 (patch) | |
| tree | 769103c4f6bc77677b5e9e42485fd80a81017ba3 | |
| parent | c9008c6c8b551616d6e96942e519a2d872cdf1bc (diff) | |
| download | rust-cb912351313bcacc9ee0d50414c3005635802ec9.tar.gz rust-cb912351313bcacc9ee0d50414c3005635802ec9.zip | |
Rename `LayoutCalculator::delay_bug` as `LayoutCalculator::delayed_bug`.
To match with the previous commits.
| -rw-r--r-- | compiler/rustc_abi/src/layout.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/layout.rs | 2 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir-ty/src/layout.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_abi/src/layout.rs b/compiler/rustc_abi/src/layout.rs index 815edcc0dc4..050366b081f 100644 --- a/compiler/rustc_abi/src/layout.rs +++ b/compiler/rustc_abi/src/layout.rs @@ -14,7 +14,7 @@ use crate::{ 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 @@ pub trait LayoutCalculator { 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(), )); diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index e89b88eb811..e1d1f361091 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -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); } diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs index b2591f016d4..27c79499868 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs @@ -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); } |
