Skip to content

Commit b4c9e8a

Browse files
nikomatsakisflaper87
authored andcommitted
---
yaml --- r: 185305 b: refs/heads/master c: e8df95d h: refs/heads/master i: 185303: 5114e67 v: v3
1 parent 744aabb commit b4c9e8a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-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: 24bdce4bbf55dd7f88492fd3a106bca2efdaa1a6
2+
refs/heads/master: e8df95d77f65a3a1456f7e10d9d1dd209acf2879
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,8 +1143,13 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
11431143
}
11441144

11451145
match self_ty.sty {
1146-
ty::ty_infer(ty::TyVar(_)) |
11471146
ty::ty_trait(..) => {},
1147+
ty::ty_infer(ty::TyVar(_)) => {
1148+
// the defaulted impl might apply, we don't know
1149+
if ty::trait_has_default_impl(self.tcx(), def_id) {
1150+
candidates.ambiguous = true;
1151+
}
1152+
}
11481153
_ => {
11491154
if ty::trait_has_default_impl(self.tcx(), def_id) {
11501155
candidates.vec.push(DefaultImplCandidate(def_id.clone()))

0 commit comments

Comments
 (0)