]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/regionck.rs
Make RFC 1214 warnings into errors, and rip out the "warn or err"
[rust.git] / src / librustc_typeck / check / regionck.rs
index 8777e38bb71d8a69fe7e2526e7149ced530d4074..759d561a961b7dab66aa761a5bd9abea38b0fa86 100644 (file)
@@ -99,7 +99,6 @@
 use middle::ty::wf::ImpliedBound;
 
 use std::mem;
-use std::rc::Rc;
 use syntax::ast;
 use syntax::codemap::Span;
 use rustc_front::intravisit::{self, Visitor};
@@ -426,8 +425,6 @@ fn code_to_origin(&self,
                       code: &traits::ObligationCauseCode<'tcx>)
                       -> SubregionOrigin<'tcx> {
         match *code {
-            traits::ObligationCauseCode::RFC1214(ref code) =>
-                infer::RFC1214Subregion(Rc::new(self.code_to_origin(span, sup_type, code))),
             traits::ObligationCauseCode::ReferenceOutlivesReferent(ref_type) =>
                 infer::ReferenceOutlivesReferent(ref_type, span),
             _ =>
@@ -1606,10 +1603,6 @@ fn components_must_outlive<'a, 'tcx>(rcx: &Rcx<'a, 'tcx>,
                     origin.span(),
                     &format!("unresolved inference variable in outlives: {:?}", v));
             }
-            ty::outlives::Component::RFC1214(subcomponents) => {
-                let suborigin = infer::RFC1214Subregion(Rc::new(origin));
-                components_must_outlive(rcx, suborigin, subcomponents, region);
-            }
         }
     }
 }