Remove constant parameter from CrateLocator::new
This commit is contained in:
parent
e1ac0fa95b
commit
3a02cdb54f
@ -581,7 +581,6 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
|
|||||||
self.tcx.crate_types().iter().all(|c| *c == CrateType::Rlib),
|
self.tcx.crate_types().iter().all(|c| *c == CrateType::Rlib),
|
||||||
hash,
|
hash,
|
||||||
extra_filename,
|
extra_filename,
|
||||||
false, // is_host
|
|
||||||
path_kind,
|
path_kind,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -222,7 +222,6 @@ use rustc_data_structures::owned_slice::slice_owned;
|
|||||||
use rustc_data_structures::svh::Svh;
|
use rustc_data_structures::svh::Svh;
|
||||||
use rustc_errors::{DiagArgValue, IntoDiagArg};
|
use rustc_errors::{DiagArgValue, IntoDiagArg};
|
||||||
use rustc_fs_util::try_canonicalize;
|
use rustc_fs_util::try_canonicalize;
|
||||||
use rustc_session::config;
|
|
||||||
use rustc_session::cstore::CrateSource;
|
use rustc_session::cstore::CrateSource;
|
||||||
use rustc_session::filesearch::FileSearch;
|
use rustc_session::filesearch::FileSearch;
|
||||||
use rustc_session::search_paths::PathKind;
|
use rustc_session::search_paths::PathKind;
|
||||||
@ -309,7 +308,6 @@ impl<'a> CrateLocator<'a> {
|
|||||||
is_rlib: bool,
|
is_rlib: bool,
|
||||||
hash: Option<Svh>,
|
hash: Option<Svh>,
|
||||||
extra_filename: Option<&'a str>,
|
extra_filename: Option<&'a str>,
|
||||||
is_host: bool,
|
|
||||||
path_kind: PathKind,
|
path_kind: PathKind,
|
||||||
) -> CrateLocator<'a> {
|
) -> CrateLocator<'a> {
|
||||||
let needs_object_code = sess.opts.output_types.should_codegen();
|
let needs_object_code = sess.opts.output_types.should_codegen();
|
||||||
@ -340,17 +338,9 @@ impl<'a> CrateLocator<'a> {
|
|||||||
},
|
},
|
||||||
hash,
|
hash,
|
||||||
extra_filename,
|
extra_filename,
|
||||||
target: if is_host { &sess.host } else { &sess.target },
|
target: &sess.target,
|
||||||
triple: if is_host {
|
triple: sess.opts.target_triple.clone(),
|
||||||
TargetTriple::from_triple(config::host_triple())
|
filesearch: sess.target_filesearch(path_kind),
|
||||||
} else {
|
|
||||||
sess.opts.target_triple.clone()
|
|
||||||
},
|
|
||||||
filesearch: if is_host {
|
|
||||||
sess.host_filesearch(path_kind)
|
|
||||||
} else {
|
|
||||||
sess.target_filesearch(path_kind)
|
|
||||||
},
|
|
||||||
is_proc_macro: false,
|
is_proc_macro: false,
|
||||||
crate_rejections: CrateRejections::default(),
|
crate_rejections: CrateRejections::default(),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user