]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_llvm/type_.rs
Rollup merge of #74136 - JohnTitor:index-page-link, r=GuillaumeGomez
[rust.git] / src / librustc_codegen_llvm / type_.rs
index 85e0f284e26c0fbe52d3db55bac28d9c9d797760..854eff31733805e349062e7876efd4889b756cc9 100644 (file)
@@ -1,21 +1,21 @@
 pub use crate::llvm::Type;
 
+use crate::abi::{FnAbiLlvmExt, LlvmType};
+use crate::common;
 use crate::context::CodegenCx;
 use crate::llvm;
 use crate::llvm::{Bool, False, True};
-use crate::value::Value;
-use rustc::bug;
-use rustc_codegen_ssa::traits::*;
-
-use crate::abi::{FnAbiLlvmExt, LlvmType};
-use crate::common;
 use crate::type_of::LayoutLlvmExt;
-use rustc::ty::layout::{self, Align, Size, TyAndLayout};
-use rustc::ty::Ty;
+use crate::value::Value;
 use rustc_ast::ast;
 use rustc_codegen_ssa::common::TypeKind;
+use rustc_codegen_ssa::traits::*;
 use rustc_data_structures::small_c_str::SmallCStr;
+use rustc_middle::bug;
+use rustc_middle::ty::layout::TyAndLayout;
+use rustc_middle::ty::Ty;
 use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
+use rustc_target::abi::{Align, Integer, Size};
 
 use std::fmt;
 use std::ptr;
@@ -115,14 +115,14 @@ impl CodegenCx<'ll, 'tcx> {
 
     crate fn type_pointee_for_align(&self, align: Align) -> &'ll Type {
         // FIXME(eddyb) We could find a better approximation if ity.align < align.
-        let ity = layout::Integer::approximate_align(self, align);
+        let ity = Integer::approximate_align(self, align);
         self.type_from_integer(ity)
     }
 
     /// Return a LLVM type that has at most the required alignment,
     /// and exactly the required size, as a best-effort padding array.
     crate fn type_padding_filler(&self, size: Size, align: Align) -> &'ll Type {
-        let unit = layout::Integer::approximate_align(self, align);
+        let unit = Integer::approximate_align(self, align);
         let size = size.bytes();
         let unit_size = unit.size().bytes();
         assert_eq!(size % unit_size, 0);