//! These methods return true to indicate that the visitor has found what it is
//! looking for, and does not need to visit anything else.
-use crate::hir::def_id::DefId;
use crate::ty::{self, flags::FlagComputation, Binder, Ty, TyCtxt, TypeFlags};
+use rustc_hir::def_id::DefId;
-use crate::util::nodemap::FxHashSet;
+use rustc_data_structures::fx::FxHashSet;
use std::collections::BTreeMap;
use std::fmt;
}
}
+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