Skip to content

Commit 75adc87

Browse files
Fix warnings
1 parent cd9596a commit 75adc87

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/consts.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#[cfg(feature = "master")]
22
use gccjit::{FnAttribute, VarAttribute, Visibility};
33
use gccjit::{Function, GlobalKind, LValue, RValue, ToRValue, Type};
4-
use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, DerivedTypeMethods, StaticMethods};
4+
use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, StaticMethods};
55
use rustc_hir::def::DefKind;
66
use rustc_middle::bug;
77
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
88
use rustc_middle::mir::interpret::{
99
self, read_target_uint, ConstAllocation, ErrorHandled, Scalar as InterpScalar,
1010
};
11-
use rustc_middle::mir::mono::MonoItem;
1211
use rustc_middle::span_bug;
1312
use rustc_middle::ty::layout::LayoutOf;
1413
use rustc_middle::ty::{self, Instance};

src/type_of.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_middle::ty::print::with_no_trimmed_paths;
88
use rustc_middle::ty::{self, Ty, TypeVisitableExt};
99
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
1010
use rustc_target::abi::{
11-
self, Abi, Align, FieldsShape, Float, Int, Integer, PointeeInfo, Pointer, Size, TyAbiInterface,
11+
self, Abi, FieldsShape, Float, Int, Integer, PointeeInfo, Pointer, Size, TyAbiInterface,
1212
Variants,
1313
};
1414

@@ -53,12 +53,6 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
5353
}
5454
}
5555

56-
impl<'a, 'tcx> CodegenCx<'a, 'tcx> {
57-
pub fn align_of(&self, ty: Ty<'tcx>) -> Align {
58-
self.layout_of(ty).align.abi
59-
}
60-
}
61-
6256
fn uncached_gcc_type<'gcc, 'tcx>(
6357
cx: &CodegenCx<'gcc, 'tcx>,
6458
layout: TyAndLayout<'tcx>,

0 commit comments

Comments
 (0)