@@ -251,7 +251,9 @@ fn solve_goal(program_text: &str, goals: Vec<(&str, SolverChoice, TestGoal)>, co
251
251
db. program_ir ( ) . unwrap ( )
252
252
} ;
253
253
254
- for ( goal_text, solver_choice, expected) in goals {
254
+ let mut last_expected_pos = None ;
255
+
256
+ for ( goal_text, solver_choice, mut expected) in goals {
255
257
match ( & solver_choice, & expected) {
256
258
( SolverChoice :: Recursive { .. } , TestGoal :: All ( _) )
257
259
| ( SolverChoice :: Recursive { .. } , TestGoal :: First ( _) ) => {
@@ -264,6 +266,15 @@ fn solve_goal(program_text: &str, goals: Vec<(&str, SolverChoice, TestGoal)>, co
264
266
db. set_solver_choice ( solver_choice) ;
265
267
}
266
268
269
+ if let TestGoal :: Aggregated ( expected) = & mut expected {
270
+ if let Some ( last_expected_pos) = last_expected_pos {
271
+ if last_expected_pos == ExpectPos :: of ( expected) {
272
+ expected. bless ( false )
273
+ }
274
+ }
275
+ last_expected_pos = Some ( ExpectPos :: of ( expected) ) ;
276
+ }
277
+
267
278
chalk_integration:: tls:: set_current_program ( & program, || {
268
279
println ! ( "----------------------------------------------------------------------" ) ;
269
280
println ! ( "goal {}" , goal_text) ;
@@ -332,6 +343,23 @@ fn solve_goal(program_text: &str, goals: Vec<(&str, SolverChoice, TestGoal)>, co
332
343
} )
333
344
}
334
345
346
+ #[ derive( Clone , Copy , PartialEq , Eq ) ]
347
+ struct ExpectPos {
348
+ file : & ' static str ,
349
+ line : u32 ,
350
+ column : u32 ,
351
+ }
352
+
353
+ impl ExpectPos {
354
+ fn of ( e : & Expect ) -> Self {
355
+ Self {
356
+ file : e. position . file ,
357
+ line : e. position . line ,
358
+ column : e. position . column
359
+ }
360
+ }
361
+ }
362
+
335
363
mod arrays;
336
364
mod auto_traits;
337
365
mod closures;
0 commit comments