@@ -71,8 +71,8 @@ pub fn ensure_removed(dcx: &DiagCtxt, path: &Path) {
71
71
72
72
/// Performs the linkage portion of the compilation phase. This will generate all
73
73
/// of the requested outputs for this compilation session.
74
- pub fn link_binary < ' a > (
75
- sess : & ' a Session ,
74
+ pub fn link_binary (
75
+ sess : & Session ,
76
76
archive_builder_builder : & dyn ArchiveBuilderBuilder ,
77
77
codegen_results : & CodegenResults ,
78
78
outputs : & OutputFilenames ,
@@ -464,9 +464,9 @@ fn link_rlib<'a>(
464
464
/// then the CodegenResults value contains one NativeLib instance for each block. However, the
465
465
/// linker appears to expect only a single import library for each library used, so we need to
466
466
/// collate the symbols together by library name before generating the import libraries.
467
- fn collate_raw_dylibs < ' a , ' b > (
468
- sess : & ' a Session ,
469
- used_libraries : impl IntoIterator < Item = & ' b NativeLib > ,
467
+ fn collate_raw_dylibs < ' a > (
468
+ sess : & Session ,
469
+ used_libraries : impl IntoIterator < Item = & ' a NativeLib > ,
470
470
) -> Result < Vec < ( String , Vec < DllImport > ) > , ErrorGuaranteed > {
471
471
// Use index maps to preserve original order of imports and libraries.
472
472
let mut dylib_table = FxIndexMap :: < String , FxIndexMap < Symbol , & DllImport > > :: default ( ) ;
@@ -513,8 +513,8 @@ fn collate_raw_dylibs<'a, 'b>(
513
513
///
514
514
/// There's no need to include metadata in a static archive, so ensure to not link in the metadata
515
515
/// object file (and also don't prepare the archive with a metadata file).
516
- fn link_staticlib < ' a > (
517
- sess : & ' a Session ,
516
+ fn link_staticlib (
517
+ sess : & Session ,
518
518
archive_builder_builder : & dyn ArchiveBuilderBuilder ,
519
519
codegen_results : & CodegenResults ,
520
520
out_filename : & Path ,
@@ -626,11 +626,7 @@ fn link_staticlib<'a>(
626
626
627
627
/// Use `thorin` (rust implementation of a dwarf packaging utility) to link DWARF objects into a
628
628
/// DWARF package.
629
- fn link_dwarf_object < ' a > (
630
- sess : & ' a Session ,
631
- cg_results : & CodegenResults ,
632
- executable_out_filename : & Path ,
633
- ) {
629
+ fn link_dwarf_object ( sess : & Session , cg_results : & CodegenResults , executable_out_filename : & Path ) {
634
630
let mut dwp_out_filename = executable_out_filename. to_path_buf ( ) . into_os_string ( ) ;
635
631
dwp_out_filename. push ( ".dwp" ) ;
636
632
debug ! ( ?dwp_out_filename, ?executable_out_filename) ;
@@ -734,8 +730,8 @@ fn link_dwarf_object<'a>(
734
730
///
735
731
/// This will invoke the system linker/cc to create the resulting file. This links to all upstream
736
732
/// files as well.
737
- fn link_natively < ' a > (
738
- sess : & ' a Session ,
733
+ fn link_natively (
734
+ sess : & Session ,
739
735
archive_builder_builder : & dyn ArchiveBuilderBuilder ,
740
736
crate_type : CrateType ,
741
737
out_filename : & Path ,
@@ -1099,8 +1095,8 @@ fn link_natively<'a>(
1099
1095
Ok ( ( ) )
1100
1096
}
1101
1097
1102
- fn strip_symbols_with_external_utility < ' a > (
1103
- sess : & ' a Session ,
1098
+ fn strip_symbols_with_external_utility (
1099
+ sess : & Session ,
1104
1100
util : & str ,
1105
1101
out_filename : & Path ,
1106
1102
option : Option < & str > ,
@@ -2108,10 +2104,10 @@ fn add_rpath_args(
2108
2104
/// to the linking process as a whole.
2109
2105
/// Order-independent options may still override each other in order-dependent fashion,
2110
2106
/// e.g `--foo=yes --foo=no` may be equivalent to `--foo=no`.
2111
- fn linker_with_args < ' a > (
2107
+ fn linker_with_args (
2112
2108
path : & Path ,
2113
2109
flavor : LinkerFlavor ,
2114
- sess : & ' a Session ,
2110
+ sess : & Session ,
2115
2111
archive_builder_builder : & dyn ArchiveBuilderBuilder ,
2116
2112
crate_type : CrateType ,
2117
2113
tmpdir : & Path ,
@@ -2643,9 +2639,9 @@ fn add_local_native_libraries(
2643
2639
) ;
2644
2640
}
2645
2641
2646
- fn add_upstream_rust_crates < ' a > (
2642
+ fn add_upstream_rust_crates (
2647
2643
cmd : & mut dyn Linker ,
2648
- sess : & ' a Session ,
2644
+ sess : & Session ,
2649
2645
archive_builder_builder : & dyn ArchiveBuilderBuilder ,
2650
2646
codegen_results : & CodegenResults ,
2651
2647
crate_type : CrateType ,
@@ -2782,7 +2778,7 @@ fn add_upstream_native_libraries(
2782
2778
// file generated by the MSVC linker. See https://github.com/rust-lang/rust/issues/112586.
2783
2779
//
2784
2780
// The returned path will always have `fix_windows_verbatim_for_gcc()` applied to it.
2785
- fn rehome_sysroot_lib_dir < ' a > ( sess : & ' a Session , lib_dir : & Path ) -> PathBuf {
2781
+ fn rehome_sysroot_lib_dir ( sess : & Session , lib_dir : & Path ) -> PathBuf {
2786
2782
let sysroot_lib_path = sess. target_filesearch ( PathKind :: All ) . get_lib_path ( ) ;
2787
2783
let canonical_sysroot_lib_path =
2788
2784
{ try_canonicalize ( & sysroot_lib_path) . unwrap_or_else ( |_| sysroot_lib_path. clone ( ) ) } ;
@@ -2815,9 +2811,9 @@ fn rehome_sysroot_lib_dir<'a>(sess: &'a Session, lib_dir: &Path) -> PathBuf {
2815
2811
// Note, however, that if we're not doing LTO we can just pass the rlib
2816
2812
// blindly to the linker (fast) because it's fine if it's not actually
2817
2813
// included as we're at the end of the dependency chain.
2818
- fn add_static_crate < ' a > (
2814
+ fn add_static_crate (
2819
2815
cmd : & mut dyn Linker ,
2820
- sess : & ' a Session ,
2816
+ sess : & Session ,
2821
2817
archive_builder_builder : & dyn ArchiveBuilderBuilder ,
2822
2818
codegen_results : & CodegenResults ,
2823
2819
tmpdir : & Path ,
0 commit comments