Skip to content

Commit 95e0bab

Browse files
committed
---
yaml --- r: 14174 b: refs/heads/try c: b173485 h: refs/heads/master v: v3
1 parent d07360a commit 95e0bab

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: a681628bd4faf9135f0764b3f1f1fdcafc491de6
5+
refs/heads/try: b17348527e2dc642561916f99b169949d7c0de93
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/comp/middle/typeck.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@ fn lookup_method_inner(fcx: @fn_ctxt, expr: @ast::expr,
16951695
} else { csearch::get_type(tcx, did).ty }
16961696
}
16971697

1698-
let result = none;
1698+
let result = none, complained = false;
16991699
std::list::iter(fcx.ccx.impl_map.get(expr.id)) {|impls|
17001700
if option::is_some(result) { ret; }
17011701
for @{did, methods, _} in *impls {
@@ -1709,8 +1709,11 @@ fn lookup_method_inner(fcx: @fn_ctxt, expr: @ast::expr,
17091709
ures_ok(_) {
17101710
if option::is_some(result) {
17111711
// FIXME[impl] score specificity to resolve ambiguity?
1712-
tcx.sess.span_err(
1713-
expr.span, "multiple applicable methods in scope");
1712+
if !complained {
1713+
tcx.sess.span_err(expr.span, "multiple applicable \
1714+
methods in scope");
1715+
complained = true;
1716+
}
17141717
} else {
17151718
result = some({
17161719
method_ty: ty_from_did(tcx, m.did),

0 commit comments

Comments
 (0)