Skip to content

Commit ead6384

Browse files
committed
---
yaml --- r: 137622 b: refs/heads/master c: 7a07f2a h: refs/heads/master v: v3
1 parent 4e683bd commit ead6384

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 2bb0796ae27b3b1c0563f1779680e63b2ca322c3
2+
refs/heads/master: 7a07f2a78092b3381d44a86330eb2de364aafb95
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: cd53dac86b43e0b46f06ab265b71526242a2fc5e

trunk/src/librustc/middle/traits/select.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ enum BuiltinBoundConditions {
109109
AmbiguousBuiltin
110110
}
111111

112+
#[deriving(Show)]
112113
enum EvaluationResult {
113114
EvaluatedToOk,
114115
EvaluatedToErr,
@@ -246,7 +247,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
246247
obligation.repr(self.tcx()));
247248

248249
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
250253
}
251254

252255
fn evaluate_stack(&mut self,
@@ -259,6 +262,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
259262
// that does provide an impl.
260263
let input_types = &stack.skol_trait_ref.substs.types;
261264
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()));
262267
return EvaluatedToAmbig;
263268
}
264269

@@ -286,6 +291,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
286291
.skip(1) // skip top-most frame
287292
.any(|prev| stack.skol_trait_ref == prev.skol_trait_ref)
288293
{
294+
debug!("evaluate_stack({}) --> recursive",
295+
stack.skol_trait_ref.repr(self.tcx()));
289296
return EvaluatedToOk;
290297
}
291298

0 commit comments

Comments
 (0)