Skip to content

Commit

Permalink
Use dyn Module instead of impl Module where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jun 28, 2024
1 parent cc05efe commit e97cebb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rustc_session::config::OomStrategy;
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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/main_shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::prelude::*;
/// 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,
) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e97cebb

Please sign in to comment.