Reformat using the new identifier sorting from rustfmt
This commit is contained in:
@@ -45,15 +45,12 @@ pub trait TraitEngine<'tcx, E: 'tcx>: 'tcx {
|
||||
cause: ObligationCause<'tcx>,
|
||||
) {
|
||||
let trait_ref = ty::TraitRef::new(infcx.tcx, def_id, [ty]);
|
||||
self.register_predicate_obligation(
|
||||
infcx,
|
||||
Obligation {
|
||||
cause,
|
||||
recursion_depth: 0,
|
||||
param_env,
|
||||
predicate: trait_ref.upcast(infcx.tcx),
|
||||
},
|
||||
);
|
||||
self.register_predicate_obligation(infcx, Obligation {
|
||||
cause,
|
||||
recursion_depth: 0,
|
||||
param_env,
|
||||
predicate: trait_ref.upcast(infcx.tcx),
|
||||
});
|
||||
}
|
||||
|
||||
fn register_predicate_obligation(
|
||||
|
||||
@@ -18,14 +18,14 @@ pub use rustc_middle::traits::*;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt, Upcast};
|
||||
use rustc_span::Span;
|
||||
|
||||
pub use self::ImplSource::*;
|
||||
pub use self::SelectionError::*;
|
||||
pub use self::engine::{FromSolverError, ScrubbedTraitError, TraitEngine};
|
||||
pub(crate) use self::project::UndoLog;
|
||||
pub use self::project::{
|
||||
MismatchedProjectionTypes, Normalized, NormalizedTerm, ProjectionCache, ProjectionCacheEntry,
|
||||
ProjectionCacheKey, ProjectionCacheStorage,
|
||||
};
|
||||
pub use self::ImplSource::*;
|
||||
pub use self::SelectionError::*;
|
||||
use crate::infer::InferCtxt;
|
||||
|
||||
/// An `Obligation` represents some trait reference (e.g., `i32: Eq`) for
|
||||
|
||||
@@ -200,10 +200,10 @@ impl<'tcx> ProjectionCache<'_, 'tcx> {
|
||||
if result.must_apply_considering_regions() {
|
||||
ty.obligations = vec![];
|
||||
}
|
||||
map.insert(
|
||||
key,
|
||||
ProjectionCacheEntry::NormalizedTerm { ty, complete: Some(result) },
|
||||
);
|
||||
map.insert(key, ProjectionCacheEntry::NormalizedTerm {
|
||||
ty,
|
||||
complete: Some(result),
|
||||
});
|
||||
}
|
||||
ref value => {
|
||||
// Type inference could "strand behind" old cache entries. Leave
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_middle::ty::{self, ToPolyTraitRef, TyCtxt};
|
||||
use rustc_span::symbol::Ident;
|
||||
use rustc_span::Span;
|
||||
use rustc_span::symbol::Ident;
|
||||
pub use rustc_type_ir::elaborate::*;
|
||||
|
||||
use crate::traits::{self, Obligation, ObligationCauseCode, PredicateObligation};
|
||||
|
||||
Reference in New Issue
Block a user