Fix some warnings

This commit is contained in:
bjorn3 2019-12-18 20:26:41 +01:00
parent bfff2a50fd
commit 79ec8948d8
2 changed files with 3 additions and 3 deletions

View File

@ -21,14 +21,14 @@ pub fn codegen(tcx: TyCtxt<'_>, module: &mut Module<impl Backend + 'static>) ->
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<impl Backend + 'static>, kind: AllocatorKind) {
pub fn codegen_inner(module: &mut Module<impl Backend + 'static>, kind: AllocatorKind) {
let usize_ty = module.target_config().pointer_type();
for method in ALLOCATOR_METHODS {

View File

@ -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),