diff options
| author | Michael Goulet <michael@errs.io> | 2023-05-31 01:21:38 +0000 | 
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-06-06 18:43:20 +0000 | 
| commit | 3d4da98273553b2307d8ce3a03c476e459aa3f45 (patch) | |
| tree | f0728e73270bdf03a3c42bc2c9d54484feeae711 /compiler/rustc_infer/src/infer/combine.rs | |
| parent | b637048a89654d105a17b6b6f1a060fd8dcfd093 (diff) | |
| download | rust-3d4da98273553b2307d8ce3a03c476e459aa3f45.tar.gz rust-3d4da98273553b2307d8ce3a03c476e459aa3f45.zip | |
Make TraitEngine::new use the right solver, add compare mode
Diffstat (limited to 'compiler/rustc_infer/src/infer/combine.rs')
| -rw-r--r-- | compiler/rustc_infer/src/infer/combine.rs | 20 | 
1 files changed, 9 insertions, 11 deletions
| diff --git a/compiler/rustc_infer/src/infer/combine.rs b/compiler/rustc_infer/src/infer/combine.rs index ccfc44a7e44..7a80ee98cb3 100644 --- a/compiler/rustc_infer/src/infer/combine.rs +++ b/compiler/rustc_infer/src/infer/combine.rs @@ -231,17 +231,15 @@ impl<'tcx> InferCtxt<'tcx> { { let (a, b) = if relation.a_is_expected() { (a, b) } else { (b, a) }; - relation.register_predicates([ty::Binder::dummy( - if self.next_trait_solver() { - ty::PredicateKind::AliasRelate( - a.into(), - b.into(), - ty::AliasRelationDirection::Equate, - ) - } else { - ty::PredicateKind::ConstEquate(a, b) - }, - )]); + relation.register_predicates([ty::Binder::dummy(if self.next_trait_solver() { + ty::PredicateKind::AliasRelate( + a.into(), + b.into(), + ty::AliasRelationDirection::Equate, + ) + } else { + ty::PredicateKind::ConstEquate(a, b) + })]); return Ok(b); } | 
