Remove constant parameter from CrateLocator::new

This commit is contained in:
Nilstrieb 2024-06-06 21:50:24 +02:00
parent e1ac0fa95b
commit 3a02cdb54f
2 changed files with 3 additions and 14 deletions

View File

@ -581,7 +581,6 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
self.tcx.crate_types().iter().all(|c| *c == CrateType::Rlib),
hash,
extra_filename,
false, // is_host
path_kind,
);

View File

@ -222,7 +222,6 @@ use rustc_data_structures::owned_slice::slice_owned;
use rustc_data_structures::svh::Svh;
use rustc_errors::{DiagArgValue, IntoDiagArg};
use rustc_fs_util::try_canonicalize;
use rustc_session::config;
use rustc_session::cstore::CrateSource;
use rustc_session::filesearch::FileSearch;
use rustc_session::search_paths::PathKind;
@ -309,7 +308,6 @@ impl<'a> CrateLocator<'a> {
is_rlib: bool,
hash: Option<Svh>,
extra_filename: Option<&'a str>,
is_host: bool,
path_kind: PathKind,
) -> CrateLocator<'a> {
let needs_object_code = sess.opts.output_types.should_codegen();
@ -340,17 +338,9 @@ impl<'a> CrateLocator<'a> {
},
hash,
extra_filename,
target: if is_host { &sess.host } else { &sess.target },
triple: if is_host {
TargetTriple::from_triple(config::host_triple())
} else {
sess.opts.target_triple.clone()
},
filesearch: if is_host {
sess.host_filesearch(path_kind)
} else {
sess.target_filesearch(path_kind)
},
target: &sess.target,
triple: sess.opts.target_triple.clone(),
filesearch: sess.target_filesearch(path_kind),
is_proc_macro: false,
crate_rejections: CrateRejections::default(),
}