]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/implicator.rs
Auto merge of #30696 - steveklabnik:gh30655, r=brson
[rust.git] / src / librustc / middle / implicator.rs
index 21f09574a3fc884e38447b1a6b9e5fb9d6d5acf7..d25084bbdffb5e5794cc0840f0c4cf9d7b4750e9 100644 (file)
 
 // #![warn(deprecated_mode)]
 
+use middle::def_id::DefId;
 use middle::infer::{InferCtxt, GenericKind};
 use middle::subst::Substs;
 use middle::traits;
-use middle::ty::{self, RegionEscape, ToPolyTraitRef, ToPredicate, Ty};
-use middle::ty_fold::{TypeFoldable, TypeFolder};
+use middle::ty::{self, ToPredicate, Ty};
+use middle::ty::fold::{TypeFoldable, TypeFolder};
 
 use syntax::ast;
 use syntax::codemap::Span;
@@ -28,7 +29,7 @@
 pub enum Implication<'tcx> {
     RegionSubRegion(Option<Ty<'tcx>>, ty::Region, ty::Region),
     RegionSubGeneric(Option<Ty<'tcx>>, ty::Region, GenericKind<'tcx>),
-    Predicate(ast::DefId, ty::Predicate<'tcx>),
+    Predicate(DefId, ty::Predicate<'tcx>),
 }
 
 struct Implicator<'a, 'tcx: 'a> {
@@ -265,7 +266,7 @@ fn push_param_constraint(&mut self,
 
     fn accumulate_from_adt(&mut self,
                            ty: Ty<'tcx>,
-                           def_id: ast::DefId,
+                           def_id: DefId,
                            _generics: &ty::Generics<'tcx>,
                            substs: &Substs<'tcx>)
     {
@@ -299,6 +300,9 @@ fn accumulate_from_adt(&mut self,
                         }
                     }
                 }
+                ty::Predicate::ObjectSafe(_) |
+                ty::Predicate::WellFormed(_) => {
+                }
             }
         }
 
@@ -400,7 +404,7 @@ fn accumulate_from_object_ty(&mut self,
     }
 
     fn fully_normalize<T>(&self, value: &T) -> Result<T,ErrorReported>
-        where T : TypeFoldable<'tcx> + ty::HasTypeFlags
+        where T : TypeFoldable<'tcx>
     {
         let value =
             traits::fully_normalize(self.infcx,