]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_driver/driver.rs
Fix error
[rust.git] / src / librustc_driver / driver.rs
index 84b1ade6d8b23326e611f6c312bbe90040841272..fa5dcaa9f815e1c24f39597801ef0827a19b1246 100644 (file)
@@ -71,6 +71,7 @@ pub fn compile_input(sess: &Session,
                      output: &Option<PathBuf>,
                      addl_plugins: Option<Vec<String>>,
                      control: &CompileController) -> CompileResult {
+    use rustc_trans::back::write::OngoingCrateTranslation;
     macro_rules! controller_entry_point {
         ($point: ident, $tsess: expr, $make_state: expr, $phase_result: expr) => {{
             let state = &mut $make_state;
@@ -107,7 +108,7 @@ macro_rules! controller_entry_point {
     // We need nested scopes here, because the intermediate results can keep
     // large chunks of memory alive and we want to free them as soon as
     // possible to keep the peak memory usage low
-    let (outputs, trans): (OutputFilenames, write::OngoingCrateTranslation) = {
+    let (outputs, trans): (OutputFilenames, OngoingCrateTranslation) = {
         let krate = match phase_1_parse_input(control, sess, input) {
             Ok(krate) => krate,
             Err(mut parse_error) => {
@@ -246,8 +247,7 @@ macro_rules! controller_entry_point {
         })??
     };
 
-    #[cfg(not(feature="llvm"))]
-    {
+    if cfg!(not(feature="llvm")) {
         let (_, _) = (outputs, trans);
         sess.fatal("LLVM is not supported by this rustc");
     }