@@ -251,7 +251,7 @@ fn filename_for_metadata(sess: &Session, crate_name: &str, outputs: &OutputFilen
251251
252252pub ( crate ) fn each_linked_rlib ( sess : & Session ,
253253 info : & CrateInfo ,
254- f : & mut FnMut ( CrateNum , & Path ) ) -> Result < ( ) , String > {
254+ f : & mut dyn FnMut ( CrateNum , & Path ) ) -> Result < ( ) , String > {
255255 let crates = info. used_crates_static . iter ( ) ;
256256 let fmts = sess. dependency_formats . borrow ( ) ;
257257 let fmts = fmts. get ( & config:: CrateTypeExecutable )
@@ -984,7 +984,7 @@ fn exec_linker(sess: &Session, cmd: &mut Command, out_filename: &Path, tmpdir: &
984984 }
985985}
986986
987- fn link_args ( cmd : & mut Linker ,
987+ fn link_args ( cmd : & mut dyn Linker ,
988988 sess : & Session ,
989989 crate_type : config:: CrateType ,
990990 tmpdir : & Path ,
@@ -1195,7 +1195,7 @@ fn link_args(cmd: &mut Linker,
11951195// Also note that the native libraries linked here are only the ones located
11961196// in the current crate. Upstream crates with native library dependencies
11971197// may have their native library pulled in above.
1198- fn add_local_native_libraries ( cmd : & mut Linker ,
1198+ fn add_local_native_libraries ( cmd : & mut dyn Linker ,
11991199 sess : & Session ,
12001200 codegen_results : & CodegenResults ) {
12011201 sess. target_filesearch ( PathKind :: All ) . for_each_lib_search_path ( |path, k| {
@@ -1226,7 +1226,7 @@ fn add_local_native_libraries(cmd: &mut Linker,
12261226// Rust crates are not considered at all when creating an rlib output. All
12271227// dependencies will be linked when producing the final output (instead of
12281228// the intermediate rlib version)
1229- fn add_upstream_rust_crates ( cmd : & mut Linker ,
1229+ fn add_upstream_rust_crates ( cmd : & mut dyn Linker ,
12301230 sess : & Session ,
12311231 codegen_results : & CodegenResults ,
12321232 crate_type : config:: CrateType ,
@@ -1350,7 +1350,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
13501350 // it's packed in a .rlib, it contains stuff that are not objects that will
13511351 // make the linker error. So we must remove those bits from the .rlib before
13521352 // linking it.
1353- fn link_sanitizer_runtime ( cmd : & mut Linker ,
1353+ fn link_sanitizer_runtime ( cmd : & mut dyn Linker ,
13541354 sess : & Session ,
13551355 codegen_results : & CodegenResults ,
13561356 tmpdir : & Path ,
@@ -1419,7 +1419,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
14191419 // (aka we're making an executable), we can just pass the rlib blindly to
14201420 // the linker (fast) because it's fine if it's not actually included as
14211421 // we're at the end of the dependency chain.
1422- fn add_static_crate ( cmd : & mut Linker ,
1422+ fn add_static_crate ( cmd : & mut dyn Linker ,
14231423 sess : & Session ,
14241424 codegen_results : & CodegenResults ,
14251425 tmpdir : & Path ,
@@ -1524,7 +1524,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
15241524 }
15251525
15261526 // Same thing as above, but for dynamic crates instead of static crates.
1527- fn add_dynamic_crate ( cmd : & mut Linker , sess : & Session , cratepath : & Path ) {
1527+ fn add_dynamic_crate ( cmd : & mut dyn Linker , sess : & Session , cratepath : & Path ) {
15281528 // If we're performing LTO, then it should have been previously required
15291529 // that all upstream rust dependencies were available in an rlib format.
15301530 assert ! ( !is_full_lto_enabled( sess) ) ;
@@ -1559,7 +1559,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
15591559// generic function calls a native function, then the generic function must
15601560// be instantiated in the target crate, meaning that the native symbol must
15611561// also be resolved in the target crate.
1562- fn add_upstream_native_libraries ( cmd : & mut Linker ,
1562+ fn add_upstream_native_libraries ( cmd : & mut dyn Linker ,
15631563 sess : & Session ,
15641564 codegen_results : & CodegenResults ,
15651565 crate_type : config:: CrateType ) {
0 commit comments