Skip to content

Commit 4d5bc55

Browse files
nikomatsakisJorge Aparicio
authored andcommitted
---
yaml --- r: 167837 b: refs/heads/master c: fc7d8fa h: refs/heads/master i: 167835: 5bae6a9 v: v3
1 parent 2b99117 commit 4d5bc55

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
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: 45468f37c85adb6e1339af33c2f18770b4ac9dac
2+
refs/heads/master: fc7d8faba87716bbcaa43c3747fb8a98dc0c041a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c89417130f042c58adc60012e7cddc4ef70b70b9
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb

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

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -338,24 +338,21 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
338338
}
339339

340340
ty::Predicate::Projection(ref data) => {
341-
let result = self.infcx.probe(|_| {
341+
self.infcx.probe(|_| {
342342
let project_obligation = obligation.with(data.clone());
343-
project::poly_project_and_unify_type(self, &project_obligation)
344-
});
345-
match result {
346-
Ok(Some(_subobligations)) => {
347-
// TODO we should evaluate _subobligations, but doing so leads to an ICE
348-
// self.evaluate_predicates_recursively(previous_stack,
349-
// subobligations.iter())
350-
EvaluatedToAmbig
351-
}
352-
Ok(None) => {
353-
EvaluatedToAmbig
354-
}
355-
Err(_) => {
356-
EvaluatedToErr(Unimplemented)
343+
match project::poly_project_and_unify_type(self, &project_obligation) {
344+
Ok(Some(subobligations)) => {
345+
self.evaluate_predicates_recursively(previous_stack,
346+
subobligations.iter())
347+
}
348+
Ok(None) => {
349+
EvaluatedToAmbig
350+
}
351+
Err(_) => {
352+
EvaluatedToErr(Unimplemented)
353+
}
357354
}
358-
}
355+
})
359356
}
360357
}
361358
}

0 commit comments

Comments
 (0)