Skip to content

Commit f59b6f0

Browse files
committed
---
yaml --- r: 8188 b: refs/heads/snap-stage3 c: b173485 h: refs/heads/master v: v3
1 parent 851e4dd commit f59b6f0

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
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a681628bd4faf9135f0764b3f1f1fdcafc491de6
4+
refs/heads/snap-stage3: b17348527e2dc642561916f99b169949d7c0de93
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

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