From 04fa5d3adbb8212f5b4e87e3bbd7b74bb7c9ec65 Mon Sep 17 00:00:00 2001 From: varkor Date: Wed, 22 Aug 2018 01:35:29 +0100 Subject: Remove Ty prefix from Ty{Foreign|Param} --- src/librustc_codegen_llvm/context.rs | 2 +- src/librustc_codegen_llvm/debuginfo/metadata.rs | 2 +- src/librustc_codegen_llvm/debuginfo/type_names.rs | 4 ++-- src/librustc_codegen_llvm/mir/place.rs | 2 +- src/librustc_codegen_llvm/type_of.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs index 500e659a76d..2ee4bec5ac2 100644 --- a/src/librustc_codegen_llvm/context.rs +++ b/src/librustc_codegen_llvm/context.rs @@ -434,7 +434,7 @@ impl<'b, 'tcx> CodegenCx<'b, 'tcx> { let tail = self.tcx.struct_tail(ty); match tail.sty { - ty::TyForeign(..) => false, + ty::Foreign(..) => false, ty::TyStr | ty::Slice(..) | ty::Dynamic(..) => true, _ => bug!("unexpected unsized tail: {:?}", tail.sty), } diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index 45bb951d9c1..670b7e1fdab 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -585,7 +585,7 @@ pub fn type_metadata( trait_pointer_metadata(cx, t, None, unique_type_id), false) } - ty::TyForeign(..) => { + ty::Foreign(..) => { MetadataCreationResult::new( foreign_type_metadata(cx, t, unique_type_id), false) diff --git a/src/librustc_codegen_llvm/debuginfo/type_names.rs b/src/librustc_codegen_llvm/debuginfo/type_names.rs index e0ad72681ae..0b138d48119 100644 --- a/src/librustc_codegen_llvm/debuginfo/type_names.rs +++ b/src/librustc_codegen_llvm/debuginfo/type_names.rs @@ -48,7 +48,7 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, ty::TyInt(int_ty) => output.push_str(int_ty.ty_to_string()), ty::TyUint(uint_ty) => output.push_str(uint_ty.ty_to_string()), ty::TyFloat(float_ty) => output.push_str(float_ty.ty_to_string()), - ty::TyForeign(def_id) => push_item_name(cx, def_id, qualified, output), + ty::Foreign(def_id) => push_item_name(cx, def_id, qualified, output), ty::Adt(def, substs) => { push_item_name(cx, def.did, qualified, output); push_type_params(cx, substs, output); @@ -176,7 +176,7 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, ty::Projection(..) | ty::Anon(..) | ty::GeneratorWitness(..) | - ty::TyParam(_) => { + ty::Param(_) => { bug!("debuginfo: Trying to create type name for \ unexpected type: {:?}", t); } diff --git a/src/librustc_codegen_llvm/mir/place.rs b/src/librustc_codegen_llvm/mir/place.rs index ace907055a3..f280589b7a0 100644 --- a/src/librustc_codegen_llvm/mir/place.rs +++ b/src/librustc_codegen_llvm/mir/place.rs @@ -211,7 +211,7 @@ impl PlaceRef<'ll, 'tcx> { return simple(); } _ if !field.is_unsized() => return simple(), - ty::Slice(..) | ty::TyStr | ty::TyForeign(..) => return simple(), + ty::Slice(..) | ty::TyStr | ty::Foreign(..) => return simple(), ty::Adt(def, _) => { if def.repr.packed() { // FIXME(eddyb) generalize the adjustment when we diff --git a/src/librustc_codegen_llvm/type_of.rs b/src/librustc_codegen_llvm/type_of.rs index a970d41c15b..0864b127fae 100644 --- a/src/librustc_codegen_llvm/type_of.rs +++ b/src/librustc_codegen_llvm/type_of.rs @@ -62,7 +62,7 @@ fn uncached_llvm_type<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, // FIXME(eddyb) producing readable type names for trait objects can result // in problematically distinct types due to HRTB and subtyping (see #47638). // ty::Dynamic(..) | - ty::TyForeign(..) | + ty::Foreign(..) | ty::TyStr => { let mut name = String::with_capacity(32); let printer = DefPathBasedNames::new(cx.tcx, true, true); -- cgit 1.4.1-3-g733a5