use crate::ty::subst::SubstsRef;
use crate::ty::{self, AdtKind, List, Ty, TyCtxt};
+use rustc_ast::ast;
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_span::{Span, DUMMY_SP};
use smallvec::SmallVec;
-use syntax::ast;
use std::borrow::Cow;
use std::fmt::Debug;
}
}
+ pub fn borrow_nested_obligations(&self) -> &[N] {
+ match &self {
+ VtableImpl(i) => &i.nested[..],
+ VtableParam(n) => &n[..],
+ VtableBuiltin(i) => &i.nested[..],
+ VtableAutoImpl(d) => &d.nested[..],
+ VtableClosure(c) => &c.nested[..],
+ VtableGenerator(c) => &c.nested[..],
+ VtableObject(d) => &d.nested[..],
+ VtableFnPointer(d) => &d.nested[..],
+ VtableTraitAlias(d) => &d.nested[..],
+ }
+ }
+
pub fn map<M, F>(self, f: F) -> Vtable<'tcx, M>
where
F: FnMut(N) -> M,