Skip to content

Commit 91901ba

Browse files
committed
---
yaml --- r: 28533 b: refs/heads/try c: 4cad58c h: refs/heads/master i: 28531: 84c02ea v: v3
1 parent 823d75a commit 91901ba

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
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 39d33a653fd4aebae813ec6ad83ea2ea6009c64f
5+
refs/heads/try: 4cad58c4645c7e2247e0655d4c1d7d70ae75339b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/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)