From 89c8f3abca8c1e6f7030836052e3bc0691a0dc03 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 29 Oct 2019 19:17:16 +0200 Subject: [PATCH] rustc: rename {Fn,Arg}TypeExt to {Fn,Arg}AbiExt. --- src/librustc/ty/layout.rs | 6 +++--- src/librustc_codegen_llvm/abi.rs | 4 ++-- src/librustc_codegen_llvm/declare.rs | 2 +- src/librustc_codegen_llvm/type_of.rs | 2 +- src/librustc_codegen_ssa/mir/block.rs | 2 +- src/librustc_codegen_ssa/mir/mod.rs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs index a170fe8a953..95040135eb7 100644 --- a/src/librustc/ty/layout.rs +++ b/src/librustc/ty/layout.rs @@ -2487,7 +2487,7 @@ impl<'a, 'tcx> HashStable> for LayoutError<'tcx> { } } -pub trait FnTypeExt<'tcx, C> +pub trait FnAbiExt<'tcx, C> where C: LayoutOf, TyLayout = TyLayout<'tcx>> + HasDataLayout @@ -2507,7 +2507,7 @@ where fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi); } -impl<'tcx, C> FnTypeExt<'tcx, C> for call::FnAbi<'tcx, Ty<'tcx>> +impl<'tcx, C> FnAbiExt<'tcx, C> for call::FnAbi<'tcx, Ty<'tcx>> where C: LayoutOf, TyLayout = TyLayout<'tcx>> + HasDataLayout @@ -2528,7 +2528,7 @@ where } fn new_vtable(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self { - FnTypeExt::new_internal(cx, sig, extra_args, |ty, arg_idx| { + FnAbiExt::new_internal(cx, sig, extra_args, |ty, arg_idx| { let mut layout = cx.layout_of(ty); // Don't pass the vtable, it's not an argument of the virtual fn. // Instead, pass just the data pointer, but give it the type `*const/mut dyn Trait` diff --git a/src/librustc_codegen_llvm/abi.rs b/src/librustc_codegen_llvm/abi.rs index 5f9265df4aa..31e2fb3eccb 100644 --- a/src/librustc_codegen_llvm/abi.rs +++ b/src/librustc_codegen_llvm/abi.rs @@ -163,7 +163,7 @@ impl LlvmType for CastTarget { } } -pub trait ArgTypeExt<'ll, 'tcx> { +pub trait ArgAbiExt<'ll, 'tcx> { fn memory_ty(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type; fn store( &self, @@ -179,7 +179,7 @@ pub trait ArgTypeExt<'ll, 'tcx> { ); } -impl ArgTypeExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> { +impl ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> { /// Gets the LLVM type for a place of the original Rust type of /// this argument/return, i.e., the result of `type_of::type_of`. fn memory_ty(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type { diff --git a/src/librustc_codegen_llvm/declare.rs b/src/librustc_codegen_llvm/declare.rs index 8c22ac0118a..1fe97001fc9 100644 --- a/src/librustc_codegen_llvm/declare.rs +++ b/src/librustc_codegen_llvm/declare.rs @@ -19,7 +19,7 @@ use crate::context::CodegenCx; use crate::type_::Type; use crate::value::Value; use rustc::ty::{self, PolyFnSig}; -use rustc::ty::layout::{FnTypeExt, LayoutOf}; +use rustc::ty::layout::{FnAbiExt, LayoutOf}; use rustc::session::config::Sanitizer; use rustc_data_structures::small_c_str::SmallCStr; use rustc_codegen_ssa::traits::*; diff --git a/src/librustc_codegen_llvm/type_of.rs b/src/librustc_codegen_llvm/type_of.rs index 546d0365469..dc68872ede1 100644 --- a/src/librustc_codegen_llvm/type_of.rs +++ b/src/librustc_codegen_llvm/type_of.rs @@ -2,7 +2,7 @@ use crate::abi::{FnAbi}; use crate::common::*; use crate::type_::Type; use rustc::ty::{self, Ty, TypeFoldable}; -use rustc::ty::layout::{self, Align, LayoutOf, FnTypeExt, PointeeInfo, Size, TyLayout}; +use rustc::ty::layout::{self, Align, LayoutOf, FnAbiExt, PointeeInfo, Size, TyLayout}; use rustc_target::abi::{FloatTy, TyLayoutMethods}; use rustc::ty::print::obsolete::DefPathBasedNames; use rustc_codegen_ssa::traits::*; diff --git a/src/librustc_codegen_ssa/mir/block.rs b/src/librustc_codegen_ssa/mir/block.rs index bfc3c47592e..07e904300a6 100644 --- a/src/librustc_codegen_ssa/mir/block.rs +++ b/src/librustc_codegen_ssa/mir/block.rs @@ -1,7 +1,7 @@ use rustc_index::vec::Idx; use rustc::middle::lang_items; use rustc::ty::{self, Ty, TypeFoldable, Instance}; -use rustc::ty::layout::{self, LayoutOf, HasTyCtxt, FnTypeExt}; +use rustc::ty::layout::{self, LayoutOf, HasTyCtxt, FnAbiExt}; use rustc::mir::{self, PlaceBase, Static, StaticKind}; use rustc::mir::interpret::PanicInfo; use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode}; diff --git a/src/librustc_codegen_ssa/mir/mod.rs b/src/librustc_codegen_ssa/mir/mod.rs index 97d3ad2e238..fec31f07a34 100644 --- a/src/librustc_codegen_ssa/mir/mod.rs +++ b/src/librustc_codegen_ssa/mir/mod.rs @@ -1,5 +1,5 @@ use rustc::ty::{self, Ty, TypeFoldable, Instance}; -use rustc::ty::layout::{TyLayout, HasTyCtxt, FnTypeExt}; +use rustc::ty::layout::{TyLayout, HasTyCtxt, FnAbiExt}; use rustc::mir::{self, Body}; use rustc_target::abi::call::{FnAbi, PassMode}; use crate::base;