From e97cebb2b121038d5255257993b936c909f5cc05 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:21:42 +0000 Subject: [PATCH] Use dyn Module instead of impl Module where possible --- src/allocator.rs | 4 ++-- src/main_shim.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/allocator.rs b/src/allocator.rs index 0d01cfd3239..b4a3825e996 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -11,7 +11,7 @@ use crate::prelude::*; /// Returns whether an allocator shim was created -pub(crate) fn codegen(tcx: TyCtxt<'_>, module: &mut impl Module) -> bool { +pub(crate) fn codegen(tcx: TyCtxt<'_>, module: &mut dyn Module) -> bool { let Some(kind) = allocator_kind_for_codegen(tcx) else { return false }; codegen_inner( module, @@ -23,7 +23,7 @@ pub(crate) fn codegen(tcx: TyCtxt<'_>, module: &mut impl Module) -> bool { } fn codegen_inner( - module: &mut impl Module, + module: &mut dyn Module, kind: AllocatorKind, alloc_error_handler_kind: AllocatorKind, oom_strategy: OomStrategy, diff --git a/src/main_shim.rs b/src/main_shim.rs index 3e85abde14e..33d3f9b8a90 100644 --- a/src/main_shim.rs +++ b/src/main_shim.rs @@ -11,7 +11,7 @@ /// users main function. pub(crate) fn maybe_create_entry_wrapper( tcx: TyCtxt<'_>, - module: &mut impl Module, + module: &mut dyn Module, is_jit: bool, is_primary_cgu: bool, ) { @@ -39,7 +39,7 @@ pub(crate) fn maybe_create_entry_wrapper( fn create_entry_fn( tcx: TyCtxt<'_>, - m: &mut impl Module, + m: &mut dyn Module, rust_main_def_id: DefId, ignore_lang_start_wrapper: bool, is_main_fn: bool,