about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2017-09-29 11:13:18 +0200
committerMichael Woerister <michaelwoerister@posteo>2017-10-03 13:50:55 +0200
commitc96d0bff949ef6faed3bc5ab26b4530c2c27cc42 (patch)
tree9e7ae334fc5e0b2f70ea3358a66627e92fe37589
parentdbab705f04037f0eeb35f10b994214c992597ed4 (diff)
downloadrust-c96d0bff949ef6faed3bc5ab26b4530c2c27cc42.tar.gz
rust-c96d0bff949ef6faed3bc5ab26b4530c2c27cc42.zip
incr.comp.: Fix some merge fallout.
-rw-r--r--src/librustc/ty/maps/plumbing.rs2
-rw-r--r--src/librustc_incremental/persist/load.rs7
-rw-r--r--src/librustc_trans/base.rs2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/librustc/ty/maps/plumbing.rs b/src/librustc/ty/maps/plumbing.rs
index d65fbb8f6cf..81b9231aa4f 100644
--- a/src/librustc/ty/maps/plumbing.rs
+++ b/src/librustc/ty/maps/plumbing.rs
@@ -651,7 +651,7 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
 
                 profq_msg!(tcx,
                     ProfileQueriesMsg::QueryBegin(
-                        span.clone(),
+                        span.data(),
                         ::ty::maps::QueryMsg::$query(profq_key!(tcx, $key))
                     )
                 );
diff --git a/src/librustc_incremental/persist/load.rs b/src/librustc_incremental/persist/load.rs
index ab2630d6a17..cdfc9f2edc3 100644
--- a/src/librustc_incremental/persist/load.rs
+++ b/src/librustc_incremental/persist/load.rs
@@ -33,6 +33,13 @@ pub fn dep_graph_tcx_init<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
     tcx.allocate_metadata_dep_nodes();
     tcx.precompute_in_scope_traits_hashes();
 
+    if tcx.sess.incr_comp_session_dir_opt().is_none() {
+        // If we are only building with -Zquery-dep-graph but without an actual
+        // incr. comp. session directory, we exit here. Otherwise we'd fail
+        // when trying to load work products.
+        return
+    }
+
     let work_products_path = work_products_path(tcx.sess);
     if let Some(work_products_data) = load_data(tcx.sess, &work_products_path) {
         // Decode the list of work_products
diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs
index c9ed17bfaf0..8c39f579b3e 100644
--- a/src/librustc_trans/base.rs
+++ b/src/librustc_trans/base.rs
@@ -956,8 +956,6 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
         }
     }
 
-    assert!(codegen_units.len() <= 1 || !tcx.sess.lto());
-
     let ongoing_translation = write::start_async_translation(
         tcx,
         time_graph.clone(),