@@ -251,7 +251,7 @@ fn filename_for_metadata(sess: &Session, crate_name: &str, outputs: &OutputFilen
251
251
252
252
pub ( crate ) fn each_linked_rlib ( sess : & Session ,
253
253
info : & CrateInfo ,
254
- f : & mut FnMut ( CrateNum , & Path ) ) -> Result < ( ) , String > {
254
+ f : & mut dyn FnMut ( CrateNum , & Path ) ) -> Result < ( ) , String > {
255
255
let crates = info. used_crates_static . iter ( ) ;
256
256
let fmts = sess. dependency_formats . borrow ( ) ;
257
257
let fmts = fmts. get ( & config:: CrateTypeExecutable )
@@ -984,7 +984,7 @@ fn exec_linker(sess: &Session, cmd: &mut Command, out_filename: &Path, tmpdir: &
984
984
}
985
985
}
986
986
987
- fn link_args ( cmd : & mut Linker ,
987
+ fn link_args ( cmd : & mut dyn Linker ,
988
988
sess : & Session ,
989
989
crate_type : config:: CrateType ,
990
990
tmpdir : & Path ,
@@ -1195,7 +1195,7 @@ fn link_args(cmd: &mut Linker,
1195
1195
// Also note that the native libraries linked here are only the ones located
1196
1196
// in the current crate. Upstream crates with native library dependencies
1197
1197
// 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 ,
1199
1199
sess : & Session ,
1200
1200
codegen_results : & CodegenResults ) {
1201
1201
sess. target_filesearch ( PathKind :: All ) . for_each_lib_search_path ( |path, k| {
@@ -1226,7 +1226,7 @@ fn add_local_native_libraries(cmd: &mut Linker,
1226
1226
// Rust crates are not considered at all when creating an rlib output. All
1227
1227
// dependencies will be linked when producing the final output (instead of
1228
1228
// the intermediate rlib version)
1229
- fn add_upstream_rust_crates ( cmd : & mut Linker ,
1229
+ fn add_upstream_rust_crates ( cmd : & mut dyn Linker ,
1230
1230
sess : & Session ,
1231
1231
codegen_results : & CodegenResults ,
1232
1232
crate_type : config:: CrateType ,
@@ -1350,7 +1350,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
1350
1350
// it's packed in a .rlib, it contains stuff that are not objects that will
1351
1351
// make the linker error. So we must remove those bits from the .rlib before
1352
1352
// linking it.
1353
- fn link_sanitizer_runtime ( cmd : & mut Linker ,
1353
+ fn link_sanitizer_runtime ( cmd : & mut dyn Linker ,
1354
1354
sess : & Session ,
1355
1355
codegen_results : & CodegenResults ,
1356
1356
tmpdir : & Path ,
@@ -1419,7 +1419,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
1419
1419
// (aka we're making an executable), we can just pass the rlib blindly to
1420
1420
// the linker (fast) because it's fine if it's not actually included as
1421
1421
// 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 ,
1423
1423
sess : & Session ,
1424
1424
codegen_results : & CodegenResults ,
1425
1425
tmpdir : & Path ,
@@ -1524,7 +1524,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
1524
1524
}
1525
1525
1526
1526
// 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 ) {
1528
1528
// If we're performing LTO, then it should have been previously required
1529
1529
// that all upstream rust dependencies were available in an rlib format.
1530
1530
assert ! ( !is_full_lto_enabled( sess) ) ;
@@ -1559,7 +1559,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
1559
1559
// generic function calls a native function, then the generic function must
1560
1560
// be instantiated in the target crate, meaning that the native symbol must
1561
1561
// 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 ,
1563
1563
sess : & Session ,
1564
1564
codegen_results : & CodegenResults ,
1565
1565
crate_type : config:: CrateType ) {
0 commit comments