Skip to content

Commit d870a96

Browse files
committed
trans_ -> fully_ prefix
1 parent f2ebe96 commit d870a96

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

src/librustc/infer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,16 +480,16 @@ impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx> {
480480
{
481481
assert!(!value.needs_subst());
482482
let value = self.erase_late_bound_regions(value);
483-
self.trans_normalize_associated_types_in(&value)
483+
self.fully_normalize_associated_types_in(&value)
484484
}
485485

486486
/// Fully normalizes any associated types in `value`, using an
487487
/// empty environment and `Reveal::All` mode (therefore, suitable
488488
/// only for monomorphized code during trans, basically).
489-
pub fn trans_normalize_associated_types_in<T>(self, value: &T) -> T
489+
pub fn fully_normalize_associated_types_in<T>(self, value: &T) -> T
490490
where T: TransNormalize<'tcx>
491491
{
492-
debug!("trans_normalize_associated_types_in(t={:?})", value);
492+
debug!("fully_normalize_associated_types_in(t={:?})", value);
493493

494494
let param_env = ty::ParamEnv::empty(Reveal::All);
495495
let value = self.erase_regions(value);

src/librustc/ty/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2323,6 +2323,6 @@ pub fn provide(providers: &mut ty::maps::Providers) {
23232323
tcx.sess.features.borrow().clone_closures
23242324
};
23252325
providers.normalize_ty = |tcx, ty| {
2326-
tcx.trans_normalize_associated_types_in(&ty)
2326+
tcx.fully_normalize_associated_types_in(&ty)
23272327
};
23282328
}

src/librustc_lint/types.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
431431
// fields are actually safe.
432432
let mut all_phantom = true;
433433
for field in &def.struct_variant().fields {
434-
let field_ty = cx.trans_normalize_associated_types_in(
434+
let field_ty = cx.fully_normalize_associated_types_in(
435435
&field.ty(cx, substs)
436436
);
437437
let r = self.check_type_for_ffi(cache, field_ty);
@@ -465,7 +465,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
465465

466466
let mut all_phantom = true;
467467
for field in &def.struct_variant().fields {
468-
let field_ty = cx.trans_normalize_associated_types_in(
468+
let field_ty = cx.fully_normalize_associated_types_in(
469469
&field.ty(cx, substs)
470470
);
471471
let r = self.check_type_for_ffi(cache, field_ty);
@@ -520,7 +520,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
520520
// Check the contained variants.
521521
for variant in &def.variants {
522522
for field in &variant.fields {
523-
let arg = cx.trans_normalize_associated_types_in(
523+
let arg = cx.fully_normalize_associated_types_in(
524524
&field.ty(cx, substs)
525525
);
526526
let r = self.check_type_for_ffi(cache, arg);
@@ -635,7 +635,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
635635
fn check_type_for_ffi_and_report_errors(&mut self, sp: Span, ty: Ty<'tcx>) {
636636
// it is only OK to use this function because extern fns cannot have
637637
// any generic types right now:
638-
let ty = self.cx.tcx.trans_normalize_associated_types_in(&ty);
638+
let ty = self.cx.tcx.fully_normalize_associated_types_in(&ty);
639639

640640
match self.check_type_for_ffi(&mut FxHashSet(), ty) {
641641
FfiResult::FfiSafe => {}

src/librustc_trans/adt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub fn compute_fields<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>,
8080
ty::TyGenerator(def_id, substs, _) => {
8181
if variant_index > 0 { bug!("{} is a generator, which only has one variant", t);}
8282
substs.field_tys(def_id, cx.tcx()).map(|t| {
83-
cx.tcx().trans_normalize_associated_types_in(&t)
83+
cx.tcx().fully_normalize_associated_types_in(&t)
8484
}).collect()
8585
},
8686
_ => bug!("{} is not a type that can have fields.", t)

src/librustc_trans/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ impl<'a, 'tcx> LayoutTyper<'tcx> for &'a SharedCrateContext<'a, 'tcx> {
642642
}
643643

644644
fn normalize_projections(self, ty: Ty<'tcx>) -> Ty<'tcx> {
645-
self.tcx().trans_normalize_associated_types_in(&ty)
645+
self.tcx().fully_normalize_associated_types_in(&ty)
646646
}
647647
}
648648

src/librustc_trans/debuginfo/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ pub fn type_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
582582
}
583583
ty::TyGenerator(def_id, substs, _) => {
584584
let upvar_tys : Vec<_> = substs.field_tys(def_id, cx.tcx()).map(|t| {
585-
cx.tcx().trans_normalize_associated_types_in(&t)
585+
cx.tcx().fully_normalize_associated_types_in(&t)
586586
}).collect();
587587
prepare_tuple_metadata(cx,
588588
t,

src/librustc_trans/debuginfo/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ pub fn create_function_debug_context<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
376376
name_to_append_suffix_to.push_str(",");
377377
}
378378

379-
let actual_type = cx.tcx().trans_normalize_associated_types_in(&actual_type);
379+
let actual_type = cx.tcx().fully_normalize_associated_types_in(&actual_type);
380380
// Add actual type name to <...> clause of function name
381381
let actual_type_name = compute_debuginfo_type_name(cx,
382382
actual_type,
@@ -389,7 +389,7 @@ pub fn create_function_debug_context<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
389389
let template_params: Vec<_> = if cx.sess().opts.debuginfo == FullDebugInfo {
390390
let names = get_type_parameter_names(cx, generics);
391391
substs.types().zip(names).map(|(ty, name)| {
392-
let actual_type = cx.tcx().trans_normalize_associated_types_in(&ty);
392+
let actual_type = cx.tcx().fully_normalize_associated_types_in(&ty);
393393
let actual_type_metadata = type_metadata(cx, actual_type, syntax_pos::DUMMY_SP);
394394
let name = CString::new(name.as_str().as_bytes()).unwrap();
395395
unsafe {

src/librustc_trans_utils/monomorphize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,6 @@ pub fn field_ty<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
131131
f: &'tcx ty::FieldDef)
132132
-> Ty<'tcx>
133133
{
134-
tcx.trans_normalize_associated_types_in(&f.ty(tcx, param_substs))
134+
tcx.fully_normalize_associated_types_in(&f.ty(tcx, param_substs))
135135
}
136136

0 commit comments

Comments
 (0)