@@ -109,6 +109,7 @@ enum BuiltinBoundConditions {
109
109
AmbiguousBuiltin
110
110
}
111
111
112
+ #[ deriving( Show ) ]
112
113
enum EvaluationResult {
113
114
EvaluatedToOk ,
114
115
EvaluatedToErr ,
@@ -246,7 +247,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
246
247
obligation. repr( self . tcx( ) ) ) ;
247
248
248
249
let stack = self . push_stack ( previous_stack. map ( |x| x) , obligation) ;
249
- self . evaluate_stack ( & stack)
250
+ let result = self . evaluate_stack ( & stack) ;
251
+ debug ! ( "result: {}" , result) ;
252
+ result
250
253
}
251
254
252
255
fn evaluate_stack ( & mut self ,
@@ -259,6 +262,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
259
262
// that does provide an impl.
260
263
let input_types = & stack. skol_trait_ref . substs . types ;
261
264
if input_types. iter ( ) . any ( |& t| ty:: type_is_skolemized ( t) ) {
265
+ debug ! ( "evaluate_stack({}) --> unbound argument, must be ambiguous" ,
266
+ stack. skol_trait_ref. repr( self . tcx( ) ) ) ;
262
267
return EvaluatedToAmbig ;
263
268
}
264
269
@@ -286,6 +291,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
286
291
. skip ( 1 ) // skip top-most frame
287
292
. any ( |prev| stack. skol_trait_ref == prev. skol_trait_ref )
288
293
{
294
+ debug ! ( "evaluate_stack({}) --> recursive" ,
295
+ stack. skol_trait_ref. repr( self . tcx( ) ) ) ;
289
296
return EvaluatedToOk ;
290
297
}
291
298
0 commit comments