]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/wfcheck.rs
Make RFC 1214 warnings into errors, and rip out the "warn or err"
[rust.git] / src / librustc_typeck / check / wfcheck.rs
index ffe55c9b29b99140babe46c4b48acb2897805cfb..5d0e713012f2a618d63ca1efd8933d0d588649b9 100644 (file)
@@ -21,7 +21,6 @@
 
 use std::cell::RefCell;
 use std::collections::HashSet;
-use std::rc::Rc;
 use syntax::ast;
 use syntax::codemap::{Span};
 use syntax::parse::token::{special_idents};
@@ -38,8 +37,7 @@ pub fn new(ccx: &'ccx CrateCtxt<'ccx, 'tcx>)
                -> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
         CheckTypeWellFormedVisitor {
             ccx: ccx,
-            code: traits::ObligationCauseCode::RFC1214(
-                Rc::new(traits::ObligationCauseCode::MiscObligation))
+            code: traits::ObligationCauseCode::MiscObligation
         }
     }
 
@@ -311,8 +309,7 @@ fn check_impl(&mut self,
                         ty::wf::trait_obligations(fcx.infcx(),
                                                   fcx.body_id,
                                                   &trait_ref,
-                                                  ast_trait_ref.path.span,
-                                                  true);
+                                                  ast_trait_ref.path.span);
                     for obligation in obligations {
                         fcx.register_predicate(obligation);
                     }
@@ -343,8 +340,7 @@ fn check_where_clauses<'fcx>(&mut self,
                       .flat_map(|p| ty::wf::predicate_obligations(fcx.infcx(),
                                                                   fcx.body_id,
                                                                   p,
-                                                                  span,
-                                                                  true));
+                                                                  span));
 
         for obligation in obligations {
             fcx.register_predicate(obligation);