Skip to content

Commit c11544d

Browse files
committed
---
yaml --- r: 32617 b: refs/heads/dist-snap c: 4cad58c h: refs/heads/master i: 32615: f7d6df1 v: v3
1 parent 51ea8ba commit c11544d

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 39d33a653fd4aebae813ec6ad83ea2ea6009c64f
10+
refs/heads/dist-snap: 4cad58c4645c7e2247e0655d4c1d7d70ae75339b
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/rustc/middle/typeck/check/regionck.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,15 @@ fn visit_expr(expr: @ast::expr, &&rcx: @rcx, v: rvt) {
183183
// `constrain_auto_ref()` on all exprs. But that causes a
184184
// lot of spurious errors because of how the region
185185
// hierarchy is setup.
186-
let tcx = rcx.fcx.tcx();
187186
if rcx.fcx.ccx.method_map.contains_key(callee.id) {
188187
match callee.node {
189188
ast::expr_field(base, _, _) => {
190189
constrain_auto_ref(rcx, base);
191190
}
192191
_ => {
193-
tcx.sess.span_bug(
194-
callee.span,
195-
~"call of method that is not a field");
192+
// This can happen if you have code like
193+
// (x[0])() where `x[0]` is overloaded. Just
194+
// ignore it.
196195
}
197196
}
198197
} else {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
use dvec::DVec;
2+
3+
fn foo() -> int { 22 }
4+
5+
fn main() {
6+
let x = DVec::<@fn() -> int>();
7+
x.push(foo);
8+
assert (x[0])() == 22;
9+
}

0 commit comments

Comments
 (0)