]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/traits/mod.rs
Make RFC 1214 warnings into errors, and rip out the "warn or err"
[rust.git] / src / librustc / middle / traits / mod.rs
index 691bac0cef865f82c6cde00f92074961e1018226..255680465ca7fa4860c25bb2f2cebeb56b28fecb 100644 (file)
@@ -106,9 +106,6 @@ pub enum ObligationCauseCode<'tcx> {
     /// Not well classified or should be obvious from span.
     MiscObligation,
 
-    /// Obligation that triggers warning until RFC 1214 is fully in place.
-    RFC1214(Rc<ObligationCauseCode<'tcx>>),
-
     /// This is the trait reference from the given projection
     SliceOrArrayElem,
 
@@ -554,24 +551,6 @@ pub fn dummy() -> ObligationCause<'tcx> {
     }
 }
 
-/// This marker is used in some caches to record whether the
-/// predicate, if it is found to be false, will yield a warning (due
-/// to RFC1214) or an error. We separate these two cases in the cache
-/// so that if we see the same predicate twice, first resulting in a
-/// warning, and next resulting in an error, we still report the
-/// error, rather than considering it a duplicate.
-#[derive(Copy, Clone, PartialEq, Eq, Hash)]
-pub struct RFC1214Warning(bool);
-
-impl<'tcx> ObligationCauseCode<'tcx> {
-    pub fn is_rfc1214(&self) -> bool {
-        match *self {
-            ObligationCauseCode::RFC1214(..) => true,
-            _ => false,
-        }
-    }
-}
-
 impl<'tcx, N> Vtable<'tcx, N> {
     pub fn nested_obligations(self) -> Vec<N> {
         match self {