Skip to content

Commit 1c0b0e6

Browse files
nikomatsakisflaper87
authored andcommitted
---
yaml --- r: 185019 b: refs/heads/snap-stage3 c: e8df95d h: refs/heads/master i: 185017: 30040a2 185015: b655def v: v3
1 parent a115267 commit 1c0b0e6

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,7 +1,7 @@
11
---
22
refs/heads/master: f0f7ca27de6b4e03f30012656dad270cda55a363
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 24bdce4bbf55dd7f88492fd3a106bca2efdaa1a6
4+
refs/heads/snap-stage3: e8df95d77f65a3a1456f7e10d9d1dd209acf2879
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

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