Skip to content

Commit 6f3b73f

Browse files
committed
use "helper" as a more descriptive name
1 parent 4b046a0 commit 6f3b73f

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

rustc_public/src/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub(crate) fn try_new_allocation<'tcx>(
5959
}
6060
ConstValue::Indirect { alloc_id, offset } => {
6161
let alloc = alloc::try_new_indirect(alloc_id, cx);
62-
use rustc_public_bridge::context::SmirAllocRange;
62+
use rustc_public_bridge::context::AllocRangeHelpers;
6363
Ok(allocation_filter(&alloc.0, cx.alloc_range(offset, layout.size), tables, cx))
6464
}
6565
}

rustc_public/src/compiler_interface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ impl<'tcx> CompilerInterface for Container<'tcx, BridgeTys> {
567567
DefKind::Fn => ForeignItemKind::Fn(tables.fn_def(def_id)),
568568
DefKind::Static { .. } => ForeignItemKind::Static(tables.static_def(def_id)),
569569
DefKind::ForeignTy => {
570-
use rustc_public_bridge::context::SmirTy;
570+
use rustc_public_bridge::context::TyHelpers;
571571
ForeignItemKind::Type(tables.intern_ty(cx.new_foreign(def_id)))
572572
}
573573
def_kind => unreachable!("Unexpected kind for a foreign item: {:?}", def_kind),

rustc_public/src/unstable/convert/internal.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ impl RustcInternal for ExistentialProjection {
504504
tables: &mut Tables<'_, BridgeTys>,
505505
tcx: impl InternalCx<'tcx>,
506506
) -> Self::T<'tcx> {
507-
use crate::unstable::internal_cx::SmirExistentialProjection;
507+
use crate::unstable::internal_cx::ExistentialProjectionHelpers;
508508
tcx.new_from_args(
509509
self.def_id.0.internal(tables, tcx),
510510
self.generic_args.internal(tables, tcx),
@@ -536,7 +536,7 @@ impl RustcInternal for ExistentialTraitRef {
536536
tables: &mut Tables<'_, BridgeTys>,
537537
tcx: impl InternalCx<'tcx>,
538538
) -> Self::T<'tcx> {
539-
use crate::unstable::internal_cx::SmirExistentialTraitRef;
539+
use crate::unstable::internal_cx::ExistentialTraitRefHelpers;
540540
tcx.new_from_args(
541541
self.def_id.0.internal(tables, tcx),
542542
self.generic_args.internal(tables, tcx),
@@ -552,7 +552,7 @@ impl RustcInternal for TraitRef {
552552
tables: &mut Tables<'_, BridgeTys>,
553553
tcx: impl InternalCx<'tcx>,
554554
) -> Self::T<'tcx> {
555-
use crate::unstable::internal_cx::SmirTraitRef;
555+
use crate::unstable::internal_cx::TraitRefHelpers;
556556
tcx.new_from_args(self.def_id.0.internal(tables, tcx), self.args().internal(tables, tcx))
557557
}
558558
}

rustc_public/src/unstable/convert/stable/mir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ impl<'tcx> Stable<'tcx> for mir::interpret::Allocation {
821821
tables: &mut Tables<'cx, BridgeTys>,
822822
cx: &CompilerCtxt<'cx, BridgeTys>,
823823
) -> Self::T {
824-
use rustc_public_bridge::context::SmirAllocRange;
824+
use rustc_public_bridge::context::AllocRangeHelpers;
825825
alloc::allocation_filter(
826826
self,
827827
cx.alloc_range(rustc_abi::Size::ZERO, self.size()),

rustc_public/src/unstable/internal_cx/traits.rs renamed to rustc_public/src/unstable/internal_cx/helpers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
use rustc_middle::ty;
77

8-
pub(crate) trait SmirExistentialProjection<'tcx> {
8+
pub(crate) trait ExistentialProjectionHelpers<'tcx> {
99
fn new_from_args(
1010
&self,
1111
def_id: rustc_span::def_id::DefId,
@@ -14,15 +14,15 @@ pub(crate) trait SmirExistentialProjection<'tcx> {
1414
) -> ty::ExistentialProjection<'tcx>;
1515
}
1616

17-
pub(crate) trait SmirExistentialTraitRef<'tcx> {
17+
pub(crate) trait ExistentialTraitRefHelpers<'tcx> {
1818
fn new_from_args(
1919
&self,
2020
trait_def_id: rustc_span::def_id::DefId,
2121
args: ty::GenericArgsRef<'tcx>,
2222
) -> ty::ExistentialTraitRef<'tcx>;
2323
}
2424

25-
pub(crate) trait SmirTraitRef<'tcx> {
25+
pub(crate) trait TraitRefHelpers<'tcx> {
2626
fn new_from_args(
2727
&self,
2828
trait_def_id: rustc_span::def_id::DefId,

rustc_public/src/unstable/internal_cx/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
33
use rustc_middle::ty::{List, Ty, TyCtxt};
44
use rustc_middle::{mir, ty};
5-
pub(crate) use traits::*;
5+
pub(crate) use helpers::*;
66

77
use super::InternalCx;
88

9-
pub(crate) mod traits;
9+
pub(crate) mod helpers;
1010

11-
impl<'tcx, T: InternalCx<'tcx>> SmirExistentialProjection<'tcx> for T {
11+
impl<'tcx, T: InternalCx<'tcx>> ExistentialProjectionHelpers<'tcx> for T {
1212
fn new_from_args(
1313
&self,
1414
def_id: rustc_span::def_id::DefId,
@@ -19,7 +19,7 @@ impl<'tcx, T: InternalCx<'tcx>> SmirExistentialProjection<'tcx> for T {
1919
}
2020
}
2121

22-
impl<'tcx, T: InternalCx<'tcx>> SmirExistentialTraitRef<'tcx> for T {
22+
impl<'tcx, T: InternalCx<'tcx>> ExistentialTraitRefHelpers<'tcx> for T {
2323
fn new_from_args(
2424
&self,
2525
trait_def_id: rustc_span::def_id::DefId,
@@ -29,7 +29,7 @@ impl<'tcx, T: InternalCx<'tcx>> SmirExistentialTraitRef<'tcx> for T {
2929
}
3030
}
3131

32-
impl<'tcx, T: InternalCx<'tcx>> SmirTraitRef<'tcx> for T {
32+
impl<'tcx, T: InternalCx<'tcx>> TraitRefHelpers<'tcx> for T {
3333
fn new_from_args(
3434
&self,
3535
trait_def_id: rustc_span::def_id::DefId,

0 commit comments

Comments
 (0)