remove useless lifetime of ArchiveBuilder
This commit is contained in:
parent
397937d812
commit
0c082b7fa9
5 changed files with 8 additions and 8 deletions
|
@ -21,7 +21,7 @@ use std::path::{Path, PathBuf};
|
|||
pub use crate::errors::{ArchiveBuildFailure, ExtractBundledLibsError, UnknownArchiveKind};
|
||||
|
||||
pub trait ArchiveBuilderBuilder {
|
||||
fn new_archive_builder<'a>(&self, sess: &'a Session) -> Box<dyn ArchiveBuilder<'a> + 'a>;
|
||||
fn new_archive_builder<'a>(&self, sess: &'a Session) -> Box<dyn ArchiveBuilder + 'a>;
|
||||
|
||||
/// Creates a DLL Import Library <https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-creation#creating-an-import-library>.
|
||||
/// and returns the path on disk to that import library.
|
||||
|
@ -74,7 +74,7 @@ pub trait ArchiveBuilderBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait ArchiveBuilder<'a> {
|
||||
pub trait ArchiveBuilder {
|
||||
fn add_file(&mut self, path: &Path);
|
||||
|
||||
fn add_archive(
|
||||
|
@ -167,7 +167,7 @@ pub fn try_extract_macho_fat_archive(
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
|
||||
impl<'a> ArchiveBuilder for ArArchiveBuilder<'a> {
|
||||
fn add_archive(
|
||||
&mut self,
|
||||
archive_path: &Path,
|
||||
|
|
|
@ -308,7 +308,7 @@ fn link_rlib<'a>(
|
|||
codegen_results: &CodegenResults,
|
||||
flavor: RlibFlavor,
|
||||
tmpdir: &MaybeTempDir,
|
||||
) -> Result<Box<dyn ArchiveBuilder<'a> + 'a>, ErrorGuaranteed> {
|
||||
) -> Result<Box<dyn ArchiveBuilder + 'a>, ErrorGuaranteed> {
|
||||
let lib_search_paths = archive_search_paths(sess);
|
||||
|
||||
let mut ab = archive_builder_builder.new_archive_builder(sess);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue