]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/typeck/variance.rs
rollup merge of #18407 : thestinger/arena
[rust.git] / src / librustc / middle / typeck / variance.rs
index 8e4aea4463ee37633ab7abe1be3453236b01f078..b8c47cff48c6b1fe9f92dcbd667d0ae1114169d4 100644 (file)
@@ -572,7 +572,7 @@ fn find_binding_for_lifetime(&self, param_id: ast::NodeId) -> ast::NodeId {
         match tcx.named_region_map.find(&param_id) {
             Some(&rl::DefEarlyBoundRegion(_, _, lifetime_decl_id))
                 => lifetime_decl_id,
-            Some(_) => fail!("should not encounter non early-bound cases"),
+            Some(_) => panic!("should not encounter non early-bound cases"),
 
             // The lookup should only fail when `param_id` is
             // itself a lifetime binding: use it as the decl_id.
@@ -597,11 +597,11 @@ fn is_to_be_inferred(&self, param_id: ast::NodeId) -> bool {
             assert!(is_lifetime(&tcx.map, param_id));
             let parent_id = tcx.map.get_parent(decl_id);
             let parent = tcx.map.find(parent_id).unwrap_or_else(
-                || fail!("tcx.map missing entry for id: {}", parent_id));
+                || panic!("tcx.map missing entry for id: {}", parent_id));
 
             let is_inferred;
             macro_rules! cannot_happen { () => { {
-                fail!("invalid parent: {:s} for {:s}",
+                panic!("invalid parent: {:s} for {:s}",
                       tcx.map.node_to_string(parent_id),
                       tcx.map.node_to_string(param_id));
             } } }
@@ -715,7 +715,7 @@ fn xform(&mut self,
             }
 
             _ => {
-                self.terms_cx.arena.alloc(|| TransformTerm(v1, v2))
+                &*self.terms_cx.arena.alloc(|| TransformTerm(v1, v2))
             }
         }
     }