diff options
| author | Makai <m4kai410@gmail.com> | 2025-07-15 13:51:55 +0000 |
|---|---|---|
| committer | Makai <m4kai410@gmail.com> | 2025-07-18 18:49:12 +0000 |
| commit | ad0de062b50e521bd1ea100921d25021ab90b1e5 (patch) | |
| tree | 22b5c1cced37b4561d587489bf35be2d2ac46428 /compiler/rustc_public/src | |
| parent | 7f22e88fab428181401b0c9d3aaf972784a65383 (diff) | |
| download | rust-ad0de062b50e521bd1ea100921d25021ab90b1e5.tar.gz rust-ad0de062b50e521bd1ea100921d25021ab90b1e5.zip | |
use "helper" as a more descriptive name
Diffstat (limited to 'compiler/rustc_public/src')
| -rw-r--r-- | compiler/rustc_public/src/alloc.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_public/src/compiler_interface.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_public/src/unstable/convert/internal.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_public/src/unstable/convert/stable/mir.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_public/src/unstable/internal_cx/helpers.rs (renamed from compiler/rustc_public/src/unstable/internal_cx/traits.rs) | 6 | ||||
| -rw-r--r-- | compiler/rustc_public/src/unstable/internal_cx/mod.rs | 10 |
6 files changed, 14 insertions, 14 deletions
diff --git a/compiler/rustc_public/src/alloc.rs b/compiler/rustc_public/src/alloc.rs index f2cb8a900a6..cb6cc37e829 100644 --- a/compiler/rustc_public/src/alloc.rs +++ b/compiler/rustc_public/src/alloc.rs @@ -59,7 +59,7 @@ pub(crate) fn try_new_allocation<'tcx>( } ConstValue::Indirect { alloc_id, offset } => { let alloc = alloc::try_new_indirect(alloc_id, cx); - use rustc_public_bridge::context::SmirAllocRange; + use rustc_public_bridge::context::AllocRangeHelpers; Ok(allocation_filter(&alloc.0, cx.alloc_range(offset, layout.size), tables, cx)) } } diff --git a/compiler/rustc_public/src/compiler_interface.rs b/compiler/rustc_public/src/compiler_interface.rs index 1e7a4223f3f..043064951d5 100644 --- a/compiler/rustc_public/src/compiler_interface.rs +++ b/compiler/rustc_public/src/compiler_interface.rs @@ -567,7 +567,7 @@ impl<'tcx> CompilerInterface for Container<'tcx, BridgeTys> { DefKind::Fn => ForeignItemKind::Fn(tables.fn_def(def_id)), DefKind::Static { .. } => ForeignItemKind::Static(tables.static_def(def_id)), DefKind::ForeignTy => { - use rustc_public_bridge::context::SmirTy; + use rustc_public_bridge::context::TyHelpers; ForeignItemKind::Type(tables.intern_ty(cx.new_foreign(def_id))) } def_kind => unreachable!("Unexpected kind for a foreign item: {:?}", def_kind), diff --git a/compiler/rustc_public/src/unstable/convert/internal.rs b/compiler/rustc_public/src/unstable/convert/internal.rs index 8a6238413b0..0571a03b62b 100644 --- a/compiler/rustc_public/src/unstable/convert/internal.rs +++ b/compiler/rustc_public/src/unstable/convert/internal.rs @@ -504,7 +504,7 @@ impl RustcInternal for ExistentialProjection { tables: &mut Tables<'_, BridgeTys>, tcx: impl InternalCx<'tcx>, ) -> Self::T<'tcx> { - use crate::unstable::internal_cx::SmirExistentialProjection; + use crate::unstable::internal_cx::ExistentialProjectionHelpers; tcx.new_from_args( self.def_id.0.internal(tables, tcx), self.generic_args.internal(tables, tcx), @@ -536,7 +536,7 @@ impl RustcInternal for ExistentialTraitRef { tables: &mut Tables<'_, BridgeTys>, tcx: impl InternalCx<'tcx>, ) -> Self::T<'tcx> { - use crate::unstable::internal_cx::SmirExistentialTraitRef; + use crate::unstable::internal_cx::ExistentialTraitRefHelpers; tcx.new_from_args( self.def_id.0.internal(tables, tcx), self.generic_args.internal(tables, tcx), @@ -552,7 +552,7 @@ impl RustcInternal for TraitRef { tables: &mut Tables<'_, BridgeTys>, tcx: impl InternalCx<'tcx>, ) -> Self::T<'tcx> { - use crate::unstable::internal_cx::SmirTraitRef; + use crate::unstable::internal_cx::TraitRefHelpers; tcx.new_from_args(self.def_id.0.internal(tables, tcx), self.args().internal(tables, tcx)) } } diff --git a/compiler/rustc_public/src/unstable/convert/stable/mir.rs b/compiler/rustc_public/src/unstable/convert/stable/mir.rs index 433e7a20f01..cb68129c660 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/mir.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/mir.rs @@ -821,7 +821,7 @@ impl<'tcx> Stable<'tcx> for mir::interpret::Allocation { tables: &mut Tables<'cx, BridgeTys>, cx: &CompilerCtxt<'cx, BridgeTys>, ) -> Self::T { - use rustc_public_bridge::context::SmirAllocRange; + use rustc_public_bridge::context::AllocRangeHelpers; alloc::allocation_filter( self, cx.alloc_range(rustc_abi::Size::ZERO, self.size()), diff --git a/compiler/rustc_public/src/unstable/internal_cx/traits.rs b/compiler/rustc_public/src/unstable/internal_cx/helpers.rs index da443cd78f1..da635c04d74 100644 --- a/compiler/rustc_public/src/unstable/internal_cx/traits.rs +++ b/compiler/rustc_public/src/unstable/internal_cx/helpers.rs @@ -5,7 +5,7 @@ use rustc_middle::ty; -pub(crate) trait SmirExistentialProjection<'tcx> { +pub(crate) trait ExistentialProjectionHelpers<'tcx> { fn new_from_args( &self, def_id: rustc_span::def_id::DefId, @@ -14,7 +14,7 @@ pub(crate) trait SmirExistentialProjection<'tcx> { ) -> ty::ExistentialProjection<'tcx>; } -pub(crate) trait SmirExistentialTraitRef<'tcx> { +pub(crate) trait ExistentialTraitRefHelpers<'tcx> { fn new_from_args( &self, trait_def_id: rustc_span::def_id::DefId, @@ -22,7 +22,7 @@ pub(crate) trait SmirExistentialTraitRef<'tcx> { ) -> ty::ExistentialTraitRef<'tcx>; } -pub(crate) trait SmirTraitRef<'tcx> { +pub(crate) trait TraitRefHelpers<'tcx> { fn new_from_args( &self, trait_def_id: rustc_span::def_id::DefId, diff --git a/compiler/rustc_public/src/unstable/internal_cx/mod.rs b/compiler/rustc_public/src/unstable/internal_cx/mod.rs index 6b0a06e304c..44fbfde8775 100644 --- a/compiler/rustc_public/src/unstable/internal_cx/mod.rs +++ b/compiler/rustc_public/src/unstable/internal_cx/mod.rs @@ -2,13 +2,13 @@ use rustc_middle::ty::{List, Ty, TyCtxt}; use rustc_middle::{mir, ty}; -pub(crate) use traits::*; +pub(crate) use helpers::*; use super::InternalCx; -pub(crate) mod traits; +pub(crate) mod helpers; -impl<'tcx, T: InternalCx<'tcx>> SmirExistentialProjection<'tcx> for T { +impl<'tcx, T: InternalCx<'tcx>> ExistentialProjectionHelpers<'tcx> for T { fn new_from_args( &self, def_id: rustc_span::def_id::DefId, @@ -19,7 +19,7 @@ impl<'tcx, T: InternalCx<'tcx>> SmirExistentialProjection<'tcx> for T { } } -impl<'tcx, T: InternalCx<'tcx>> SmirExistentialTraitRef<'tcx> for T { +impl<'tcx, T: InternalCx<'tcx>> ExistentialTraitRefHelpers<'tcx> for T { fn new_from_args( &self, trait_def_id: rustc_span::def_id::DefId, @@ -29,7 +29,7 @@ impl<'tcx, T: InternalCx<'tcx>> SmirExistentialTraitRef<'tcx> for T { } } -impl<'tcx, T: InternalCx<'tcx>> SmirTraitRef<'tcx> for T { +impl<'tcx, T: InternalCx<'tcx>> TraitRefHelpers<'tcx> for T { fn new_from_args( &self, trait_def_id: rustc_span::def_id::DefId, |
