Swap PredicateObligation to ThinVec
This commit is contained in:
parent
7ec06b0d1d
commit
8de8f46f78
12 changed files with 73 additions and 42 deletions
|
@ -21,5 +21,6 @@ rustc_span = { path = "../rustc_span" }
|
|||
rustc_target = { path = "../rustc_target" }
|
||||
rustc_type_ir = { path = "../rustc_type_ir" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.12"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
|
|
@ -17,6 +17,7 @@ use rustc_middle::traits::solve::Certainty;
|
|||
pub use rustc_middle::traits::*;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt, Upcast};
|
||||
use rustc_span::Span;
|
||||
use thin_vec::ThinVec;
|
||||
|
||||
pub use self::ImplSource::*;
|
||||
pub use self::SelectionError::*;
|
||||
|
@ -84,7 +85,7 @@ pub type PredicateObligation<'tcx> = Obligation<'tcx, ty::Predicate<'tcx>>;
|
|||
pub type TraitObligation<'tcx> = Obligation<'tcx, ty::TraitPredicate<'tcx>>;
|
||||
pub type PolyTraitObligation<'tcx> = Obligation<'tcx, ty::PolyTraitPredicate<'tcx>>;
|
||||
|
||||
pub type PredicateObligations<'tcx> = Vec<PredicateObligation<'tcx>>;
|
||||
pub type PredicateObligations<'tcx> = ThinVec<PredicateObligation<'tcx>>;
|
||||
|
||||
impl<'tcx> PredicateObligation<'tcx> {
|
||||
/// Flips the polarity of the inner predicate.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue