Skip to content

Commit 8fbe4bf

Browse files
committed
---
yaml --- r: 137555 b: refs/heads/snap-stage3 c: 7a07f2a h: refs/heads/master i: 137553: a18d688 137551: 62f89fa v: v3
1 parent 8ca44fd commit 8fbe4bf

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,7 +1,7 @@
11
---
22
refs/heads/master: 63fe80e1ffd036e99e1c707116774ac10203e2f1
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 2bb0796ae27b3b1c0563f1779680e63b2ca322c3
4+
refs/heads/snap-stage3: 7a07f2a78092b3381d44a86330eb2de364aafb95
55
refs/heads/try: cd53dac86b43e0b46f06ab265b71526242a2fc5e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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)