Reformat using the new identifier sorting from rustfmt

This commit is contained in:
Michael Goulet
2024-09-22 19:05:04 -04:00
parent 1173204b36
commit c682aa162b
1455 changed files with 7152 additions and 8384 deletions

View File

@@ -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(

View File

@@ -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

View File

@@ -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

View File

@@ -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};