@@ -75,8 +75,6 @@ pub(crate) struct Fulfill<'s, 'db, I: Interner> {
75
75
/// The remaining goals to prove or refute
76
76
obligations : Vec < Obligation < I > > ,
77
77
78
- priority : ClausePriority ,
79
-
80
78
/// Lifetime constraints that must be fulfilled for a solution to be fully
81
79
/// validated.
82
80
constraints : HashSet < InEnvironment < Constraint < I > > > ,
@@ -91,7 +89,6 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
91
89
pub ( crate ) fn new < T : Fold < I , I , Result = T > + HasInterner < Interner = I > + Clone > (
92
90
solver : & ' s mut Solver < ' db , I > ,
93
91
ucanonical_goal : & UCanonical < InEnvironment < T > > ,
94
- priority : ClausePriority ,
95
92
) -> ( Self , Substitution < I > , InEnvironment < T :: Result > ) {
96
93
let ( infer, subst, canonical_goal) = InferenceTable :: from_canonical (
97
94
solver. program . interner ( ) ,
@@ -102,7 +99,6 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
102
99
solver,
103
100
infer,
104
101
obligations : vec ! [ ] ,
105
- priority,
106
102
constraints : HashSet :: new ( ) ,
107
103
cannot_prove : false ,
108
104
} ;
@@ -225,8 +221,7 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
225
221
quantified,
226
222
universes,
227
223
} = self . infer . u_canonicalize ( interner, & quantified) ;
228
- let ( result, new_priority) = self . solver . solve_goal ( quantified, minimums) ;
229
- self . priority = self . priority & new_priority;
224
+ let result = self . solver . solve_goal ( quantified, minimums) ;
230
225
Ok ( PositiveSolution {
231
226
free_vars,
232
227
universes,
@@ -255,7 +250,7 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
255
250
. infer
256
251
. u_canonicalize ( self . solver . program . interner ( ) , & canonicalized) ;
257
252
let mut minimums = Minimums :: new ( ) ; // FIXME -- minimums here seems wrong
258
- if let ( Ok ( solution) , _priority ) = self . solver . solve_goal ( quantified, & mut minimums) {
253
+ if let Ok ( solution) = self . solver . solve_goal ( quantified, & mut minimums) {
259
254
if solution. is_unique ( ) {
260
255
Err ( NoSolution )
261
256
} else {
@@ -384,14 +379,14 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
384
379
mut self ,
385
380
subst : Substitution < I > ,
386
381
minimums : & mut Minimums ,
387
- ) -> ( Fallible < Solution < I > > , ClausePriority ) {
382
+ ) -> Fallible < Solution < I > > {
388
383
let outcome = match self . fulfill ( minimums) {
389
384
Ok ( o) => o,
390
- Err ( e) => return ( Err ( e) , self . priority ) ,
385
+ Err ( e) => return Err ( e) ,
391
386
} ;
392
387
393
388
if self . cannot_prove {
394
- return ( Ok ( Solution :: Ambig ( Guidance :: Unknown ) ) , self . priority ) ;
389
+ return Ok ( Solution :: Ambig ( Guidance :: Unknown ) ) ;
395
390
}
396
391
397
392
if outcome. is_complete ( ) {
@@ -403,7 +398,7 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
403
398
self . solver . program . interner ( ) ,
404
399
& ConstrainedSubst { subst, constraints } ,
405
400
) ;
406
- return ( Ok ( Solution :: Unique ( constrained. quantified ) ) , self . priority ) ;
401
+ return Ok ( Solution :: Unique ( constrained. quantified ) ) ;
407
402
}
408
403
409
404
// Otherwise, we have (positive or negative) obligations remaining, but
@@ -433,15 +428,12 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
433
428
let subst = self
434
429
. infer
435
430
. canonicalize ( self . solver . program . interner ( ) , & subst) ;
436
- return (
437
- Ok ( Solution :: Ambig ( Guidance :: Suggested ( subst. quantified ) ) ) ,
438
- self . priority ,
439
- ) ;
431
+ return Ok ( Solution :: Ambig ( Guidance :: Suggested ( subst. quantified ) ) ) ;
440
432
}
441
433
}
442
434
}
443
435
444
- ( Ok ( Solution :: Ambig ( Guidance :: Unknown ) ) , self . priority )
436
+ Ok ( Solution :: Ambig ( Guidance :: Unknown ) )
445
437
} else {
446
438
// While we failed to prove the goal, we still learned that
447
439
// something had to hold. Here's an example where this happens:
@@ -466,10 +458,7 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
466
458
let subst = self
467
459
. infer
468
460
. canonicalize ( self . solver . program . interner ( ) , & subst) ;
469
- (
470
- Ok ( Solution :: Ambig ( Guidance :: Definite ( subst. quantified ) ) ) ,
471
- self . priority ,
472
- )
461
+ Ok ( Solution :: Ambig ( Guidance :: Definite ( subst. quantified ) ) )
473
462
}
474
463
}
475
464
0 commit comments