diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-05-21 23:09:34 +0200 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2024-07-02 12:24:07 -0400 |
| commit | 527c04958469c3d8701d3ab0dedb16fa396a7900 (patch) | |
| tree | 49846408db60a146619496b9962d5394a3b036ed | |
| parent | ca654047fb130962943df137dabd6e58929319e8 (diff) | |
| download | rust-527c04958469c3d8701d3ab0dedb16fa396a7900.tar.gz rust-527c04958469c3d8701d3ab0dedb16fa396a7900.zip | |
Fix warnings
| -rw-r--r-- | src/consts.rs | 3 | ||||
| -rw-r--r-- | src/type_of.rs | 8 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/consts.rs b/src/consts.rs index 735793baf61..93c23440c57 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -1,14 +1,13 @@ #[cfg(feature = "master")] use gccjit::{FnAttribute, VarAttribute, Visibility}; use gccjit::{Function, GlobalKind, LValue, RValue, ToRValue, Type}; -use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, DerivedTypeMethods, StaticMethods}; +use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, StaticMethods}; use rustc_hir::def::DefKind; use rustc_middle::bug; use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs}; use rustc_middle::mir::interpret::{ self, read_target_uint, ConstAllocation, ErrorHandled, Scalar as InterpScalar, }; -use rustc_middle::mir::mono::MonoItem; use rustc_middle::span_bug; use rustc_middle::ty::layout::LayoutOf; use rustc_middle::ty::{self, Instance}; diff --git a/src/type_of.rs b/src/type_of.rs index a88d50cb434..24eab8e9a1e 100644 --- a/src/type_of.rs +++ b/src/type_of.rs @@ -8,7 +8,7 @@ use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::{self, CoroutineArgsExt, Ty, TypeVisitableExt}; use rustc_target::abi::call::{CastTarget, FnAbi, Reg}; use rustc_target::abi::{ - self, Abi, Align, FieldsShape, Float, Int, Integer, PointeeInfo, Pointer, Size, TyAbiInterface, + self, Abi, FieldsShape, Float, Int, Integer, PointeeInfo, Pointer, Size, TyAbiInterface, Variants, }; @@ -53,12 +53,6 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { } } -impl<'a, 'tcx> CodegenCx<'a, 'tcx> { - pub fn align_of(&self, ty: Ty<'tcx>) -> Align { - self.layout_of(ty).align.abi - } -} - fn uncached_gcc_type<'gcc, 'tcx>( cx: &CodegenCx<'gcc, 'tcx>, layout: TyAndLayout<'tcx>, |
