Skip to content

Commit 431a279

Browse files
Fix warnings
1 parent 3ff09f4 commit 431a279

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/consts.rs

+8-4
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};
@@ -254,8 +253,13 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
254253
}
255254

256255
let is_tls = fn_attrs.flags.contains(CodegenFnAttrFlags::THREAD_LOCAL);
257-
let global =
258-
self.declare_global(sym, gcc_type, GlobalKind::Exported, is_tls, fn_attrs.link_section);
256+
let global = self.declare_global(
257+
sym,
258+
gcc_type,
259+
GlobalKind::Exported,
260+
is_tls,
261+
fn_attrs.link_section,
262+
);
259263

260264
if !self.tcx.is_reachable_non_generic(def_id) {
261265
#[cfg(feature = "master")]

src/type_of.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ 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, Int, Integer, PointeeInfo, Pointer, Size, TyAbiInterface,
12-
Variants, F128, F16, F32, F64,
11+
self, Abi, FieldsShape, Int, Integer, PointeeInfo, Pointer, Size, TyAbiInterface, Variants,
12+
F128, F16, F32, F64,
1313
};
1414

1515
use crate::abi::{FnAbiGcc, FnAbiGccExt, GccType};
@@ -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)