From 79ec8948d8b33c028647c6fe7df3426b8ff4987f Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Wed, 18 Dec 2019 20:26:41 +0100 Subject: [PATCH] Fix some warnings --- src/allocator.rs | 4 ++-- src/pretty_clif.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/allocator.rs b/src/allocator.rs index df0f5d15434..cfcb091afb5 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -21,14 +21,14 @@ pub fn codegen(tcx: TyCtxt<'_>, module: &mut Module) -> if any_dynamic_crate { false } else if let Some(kind) = tcx.allocator_kind() { - codegen_inner(tcx.sess, module, kind); + codegen_inner(module, kind); true } else { false } } -pub fn codegen_inner(sess: &Session, module: &mut Module, kind: AllocatorKind) { +pub fn codegen_inner(module: &mut Module, kind: AllocatorKind) { let usize_ty = module.target_config().pointer_type(); for method in ALLOCATOR_METHODS { diff --git a/src/pretty_clif.rs b/src/pretty_clif.rs index 64359f3899f..97bb2e0caec 100644 --- a/src/pretty_clif.rs +++ b/src/pretty_clif.rs @@ -74,7 +74,7 @@ pub struct CommentWriter { impl CommentWriter { pub fn new<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self { - let mut global_comments = if cfg!(debug_assertions) { + let global_comments = if cfg!(debug_assertions) { vec![ format!("symbol {}", tcx.symbol_name(instance).name.as_str()), format!("instance {:?}", instance),