Skip to content

Commit 8b7b2c6

Browse files
committed
trying to fix fallout
1 parent 11426a4 commit 8b7b2c6

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

src/librustc_codegen_llvm/abi.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ use rustc_target::abi::call::ArgType;
1111

1212
use rustc_codegen_ssa::traits::*;
1313

14-
use rustc_target::abi::{HasDataLayout, LayoutOf, Size, TyLayout, Abi as LayoutAbi};
14+
use rustc_target::abi::{HasDataLayout, LayoutOf};
1515
use rustc::ty::{self, Ty, Instance};
16-
use rustc::ty::layout::{self, PointerKind};
16+
use rustc::ty::layout::{self};
1717

1818
use libc::c_uint;
1919

2020
pub use rustc_target::spec::abi::Abi;
2121
pub use rustc::ty::layout::{FAT_PTR_ADDR, FAT_PTR_EXTRA};
22+
pub use rustc::ty::layout::{FnTypeExt as FnTypeExt1};
2223
pub use rustc_target::abi::call::*;
2324

2425
macro_rules! for_each_kind {
@@ -547,17 +548,17 @@ impl<'tcx> FnTypeExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
547548

548549
impl AbiMethods<'tcx> for CodegenCx<'ll, 'tcx> {
549550
fn new_fn_type(&self, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> FnType<'tcx, Ty<'tcx>> {
550-
FnType::new(&self, sig, extra_args)
551+
FnTypeExt1::new(self, sig, extra_args)
551552
}
552553
fn new_vtable(
553554
&self,
554555
sig: ty::FnSig<'tcx>,
555556
extra_args: &[Ty<'tcx>]
556557
) -> FnType<'tcx, Ty<'tcx>> {
557-
FnType::new_vtable(&self, sig, extra_args)
558+
FnTypeExt1::new_vtable(self, sig, extra_args)
558559
}
559560
fn fn_type_of_instance(&self, instance: &Instance<'tcx>) -> FnType<'tcx, Ty<'tcx>> {
560-
FnType::of_instance(&self, instance)
561+
FnTypeExt1::of_instance(self, instance)
561562
}
562563
}
563564

src/librustc_codegen_llvm/declare.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use crate::attributes;
1818
use crate::context::CodegenCx;
1919
use crate::type_::Type;
2020
use crate::value::Value;
21-
use rustc::ty::{self, PolyFnSig};
22-
use rustc::ty::layout::LayoutOf;
21+
use rustc::ty::{self, PolyFnSig, Ty};
22+
use rustc::ty::layout::{LayoutOf, FnTypeExt as FnTypeExt1};
2323
use rustc::session::config::Sanitizer;
2424
use rustc_data_structures::small_c_str::SmallCStr;
2525
use rustc_codegen_ssa::traits::*;
@@ -100,7 +100,7 @@ impl DeclareMethods<'tcx> for CodegenCx<'ll, 'tcx> {
100100
let sig = self.tcx.normalize_erasing_late_bound_regions(ty::ParamEnv::reveal_all(), &sig);
101101
debug!("declare_rust_fn (after region erasure) sig={:?}", sig);
102102

103-
let fty = FnType::new(self, sig, &[]);
103+
let fty: FnType<'tcx, Ty<'tcx>> = FnTypeExt1::new(self, sig, &[]);
104104
let llfn = declare_raw_fn(self, name, fty.llvm_cconv(), fty.llvm_type(self));
105105

106106
if self.layout_of(sig.output()).abi.is_uninhabited() {

src/librustc_codegen_llvm/type_of.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
use crate::abi::{FnType, FnTypeExt};
21
use crate::common::*;
32
use crate::type_::Type;
43
use rustc::ty::{self, Ty, TypeFoldable};
5-
use rustc::ty::layout::{self, Align, LayoutOf, PointeeInfo, Size, TyLayout};
4+
use rustc::ty::layout::{self, Align, LayoutOf, FnTypeExt, PointeeInfo, Size, TyLayout};
65
use rustc_target::abi::{FloatTy, TyLayoutMethods};
76
use rustc_mir::monomorphize::item::DefPathBasedNames;
87
use rustc_codegen_ssa::traits::*;
@@ -239,7 +238,7 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyLayout<'tcx> {
239238
ty::ParamEnv::reveal_all(),
240239
&sig,
241240
);
242-
cx.fn_ptr_backend_type(&FnType::new(cx, sig, &[]))
241+
cx.fn_ptr_backend_type(&FnTypeExt::new(cx, sig, &[]))
243242
}
244243
_ => self.scalar_llvm_type_at(cx, scalar, Size::ZERO)
245244
};

src/librustc_codegen_ssa/traits/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ use std::fmt;
4949
pub trait CodegenObject: Copy + PartialEq + fmt::Debug {}
5050
impl<T: Copy + PartialEq + fmt::Debug> CodegenObject for T {}
5151

52-
pub trait CodegenMethods<'tcx>:
52+
pub trait
53+
CodegenMethods<'tcx>:
5354
Backend<'tcx>
5455
+ TypeMethods<'tcx>
5556
+ MiscMethods<'tcx>

0 commit comments

Comments
 (0)