X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_driver%2Flib.rs;h=556ee9f5716ea32c9849b8f33af0af4e39573edc;hb=aa1e6db70900cf5d11a843bc4234de0548677aba;hp=17a1a4c48f522138df1ac2d40bfade0f7e6539ae;hpb=a3f519df09bf40d09c1a111599b8f115f11fbb49;p=rust.git diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 17a1a4c48f5..556ee9f5716 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -20,6 +20,7 @@ #![feature(box_syntax)] #![cfg_attr(unix, feature(libc))] +#![feature(option_replace)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] #![feature(slice_sort_by_cached_key)] @@ -78,7 +79,6 @@ use rustc::session::{early_error, early_warn}; use rustc::lint::Lint; use rustc::lint; -use rustc::middle::cstore::CrateStore; use rustc_metadata::locator; use rustc_metadata::cstore::CStore; use rustc_metadata::dynamic_lib::DynamicLibrary; @@ -676,7 +676,7 @@ fn late_callback(&mut self, _: &dyn CodegenBackend, _: &getopts::Matches, _: &Session, - _: &dyn CrateStore, + _: &CStore, _: &Input, _: &Option, _: &Option) @@ -884,7 +884,7 @@ fn late_callback(&mut self, codegen_backend: &dyn CodegenBackend, matches: &getopts::Matches, sess: &Session, - cstore: &dyn CrateStore, + cstore: &CStore, input: &Input, odir: &Option, ofile: &Option) @@ -990,7 +990,7 @@ pub fn enable_save_analysis(control: &mut CompileController) { impl RustcDefaultCalls { pub fn list_metadata(sess: &Session, - cstore: &dyn CrateStore, + cstore: &CStore, matches: &getopts::Matches, input: &Input) -> Compilation { @@ -1002,7 +1002,7 @@ pub fn list_metadata(sess: &Session, let mut v = Vec::new(); locator::list_file_metadata(&sess.target.target, path, - cstore.metadata_loader(), + &*cstore.metadata_loader, &mut v) .unwrap(); println!("{}", String::from_utf8(v).unwrap()); @@ -1175,7 +1175,7 @@ fn usage(verbose: bool, include_unstable_options: bool) { for option in groups.iter().filter(|x| include_unstable_options || x.is_stable()) { (option.apply)(&mut options); } - let message = format!("Usage: rustc [OPTIONS] INPUT"); + let message = "Usage: rustc [OPTIONS] INPUT".to_string(); let nightly_help = if nightly_options::is_nightly_build() { "\n -Z help Print internal options for debugging rustc" } else {