about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Burka <aburka@seas.upenn.edu>2016-02-11 01:38:08 -0500
committerAlex Burka <aburka@seas.upenn.edu>2016-02-11 01:38:08 -0500
commit433f34799c5ccef2a10febb656d7568857bab2b6 (patch)
tree56c10611af3f46a9bc2a27381c128655b8f0b9e3 /src
parente13d352aaff9ab76d912adc2c119f4019a1f8ead (diff)
downloadrust-433f34799c5ccef2a10febb656d7568857bab2b6.tar.gz
rust-433f34799c5ccef2a10febb656d7568857bab2b6.zip
don't ICE on missing exchange_* lang items
Diffstat (limited to 'src')
-rw-r--r--src/librustc_trans/trans/collector.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_trans/trans/collector.rs b/src/librustc_trans/trans/collector.rs
index df86685e236..3c8d24206e7 100644
--- a/src/librustc_trans/trans/collector.rs
+++ b/src/librustc_trans/trans/collector.rs
@@ -501,7 +501,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> {
                         .tcx()
                         .lang_items
                         .require(ExchangeMallocFnLangItem)
-                        .expect("Could not find ExchangeMallocFnLangItem");
+                        .unwrap_or_else(|e| self.ccx.sess().fatal(&e));
 
                 assert!(can_have_local_instance(self.ccx, exchange_malloc_fn_def_id));
                 let exchange_malloc_fn_trans_item =
@@ -645,7 +645,7 @@ fn find_drop_glue_neighbors<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
         let exchange_free_fn_def_id = ccx.tcx()
                                          .lang_items
                                          .require(ExchangeFreeFnLangItem)
-                                         .expect("Could not find ExchangeFreeFnLangItem");
+                                         .unwrap_or_else(|e| ccx.sess().fatal(&e));
 
         assert!(can_have_local_instance(ccx, exchange_free_fn_def_id));
         let exchange_free_fn_trans_item =