]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ty/fold.rs
Add `constness` field to `ty::Predicate::Trait`
[rust.git] / src / librustc / ty / fold.rs
index b16db6ae5b18d0e321f37f9a378d6fc0c569c3e3..0dddca98c62576842301b9dee6fec6720c9b08bd 100644 (file)
@@ -150,6 +150,15 @@ fn visit_ty(&mut self, ty: Ty<'tcx>) -> bool {
     }
 }
 
+impl TypeFoldable<'tcx> for syntax::ast::Constness {
+    fn super_fold_with<F: TypeFolder<'tcx>>(&self, _: &mut F) -> Self {
+        *self
+    }
+    fn super_visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> bool {
+        false
+    }
+}
+
 /// The `TypeFolder` trait defines the actual *folding*. There is a
 /// method defined for every foldable type. Each of these has a
 /// default implementation that does an "identity" fold. Within each