Skip to content

Commit efcccbb

Browse files
committed
Fix warnings
1 parent 570b0f8 commit efcccbb

File tree

5 files changed

+5
-10
lines changed

5 files changed

+5
-10
lines changed

compiler/rustc_codegen_llvm/src/allocator.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use libc::c_uint;
22
use rustc_ast::expand::allocator::{
3-
ALLOCATOR_METHODS, AllocatorKind, AllocatorTy, NO_ALLOC_SHIM_IS_UNSTABLE,
4-
alloc_error_handler_name, default_fn_name, global_fn_name,
3+
AllocatorKind, NO_ALLOC_SHIM_IS_UNSTABLE, alloc_error_handler_name,
54
};
65
use rustc_codegen_ssa::traits::BaseTypeCodegenMethods as _;
76
use rustc_middle::bug;
@@ -18,7 +17,6 @@ pub(crate) unsafe fn codegen(
1817
tcx: TyCtxt<'_>,
1918
cx: SimpleCx<'_>,
2019
module_name: &str,
21-
kind: AllocatorKind,
2220
alloc_error_handler_kind: AllocatorKind,
2321
) {
2422
let usize = match tcx.sess.target.pointer_width {
@@ -28,7 +26,6 @@ pub(crate) unsafe fn codegen(
2826
tws => bug!("Unsupported target word size for int: {}", tws),
2927
};
3028
let i8 = cx.type_i8();
31-
let i8p = cx.type_ptr();
3229

3330
// rust alloc error handler
3431
create_wrapper_function(

compiler/rustc_codegen_llvm/src/builder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
use std::borrow::{Borrow, Cow};
2-
use std::ffi::CString;
32
use std::ops::Deref;
43
use std::{iter, ptr};
54

65
pub(crate) mod autodiff;
76

87
use libc::{c_char, c_uint, size_t};
9-
use rustc_abi::{self as abi, AddressSpace, Align, Size, WrappingRange};
8+
use rustc_abi::{self as abi, Align, Size, WrappingRange};
109
use rustc_codegen_ssa::MemFlags;
1110
use rustc_codegen_ssa::common::{IntPredicate, RealPredicate, SynchronizationScope, TypeKind};
1211
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};

compiler/rustc_codegen_llvm/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
108108
&self,
109109
tcx: TyCtxt<'tcx>,
110110
module_name: &str,
111-
kind: AllocatorKind,
111+
_kind: AllocatorKind,
112112
alloc_error_handler_kind: AllocatorKind,
113113
) -> ModuleLlvm {
114114
let module_llvm = ModuleLlvm::new_metadata(tcx, module_name);
115115
let cx =
116116
SimpleCx::new(module_llvm.llmod(), &module_llvm.llcx, tcx.data_layout.pointer_size);
117117
unsafe {
118-
allocator::codegen(tcx, cx, module_name, kind, alloc_error_handler_kind);
118+
allocator::codegen(tcx, cx, module_name, alloc_error_handler_kind);
119119
}
120120
module_llvm
121121
}

compiler/rustc_codegen_ssa/src/mir/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use rustc_middle::mir::{Body, Local, UnwindTerminateReason, traversal};
77
use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt, HasTypingEnv, TyAndLayout};
88
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable, TypeVisitableExt};
99
use rustc_middle::{bug, mir, span_bug};
10-
use rustc_symbol_mangling::mangle_internal_symbol;
1110
use rustc_target::callconv::{FnAbi, PassMode};
1211
use tracing::{debug, instrument};
1312

compiler/rustc_codegen_ssa/src/mono_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl<'a, 'tcx: 'a> MonoItemExt<'a, 'tcx> for MonoItem<'tcx> {
4040
MonoItem::GlobalAsm(item_id) => {
4141
base::codegen_global_asm(cx, item_id);
4242
}
43-
MonoItem::WeakAlias(def_id, target) => {
43+
MonoItem::WeakAlias(_def_id, _target) => {
4444
todo!()
4545
}
4646
MonoItem::Fn(instance) => {

0 commit comments

Comments
 (0)