Skip to content

Commit 204cfd2

Browse files
committed
---
yaml --- r: 55687 b: refs/heads/master c: 93e13e0 h: refs/heads/master i: 55685: 1988768 55683: 73ac468 55679: 8ce5392 v: v3
1 parent ed86684 commit 204cfd2

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 8b3c09a1038c6623528fd7ebb1d365e475d63dfc
2+
refs/heads/master: 93e13e0eee1c14ea8287e448210404f407c84d19
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a

trunk/src/librustc/middle/typeck/check/regionck.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,9 @@ fn constrain_derefs(rcx: @mut Rcx,
413413

414414
match ty::deref(tcx, derefd_ty, true) {
415415
Some(mt) => derefd_ty = mt.ty,
416-
None => {
417-
tcx.sess.span_bug(
418-
deref_expr.span,
419-
fmt!("%?'th deref is of a non-deref'able type `%s`",
420-
i, rcx.fcx.infcx().ty_to_str(derefd_ty)));
421-
}
416+
/* if this type can't be dereferenced, then there's already an error
417+
in the session saying so. Just bail out for now */
418+
None => break
422419
}
423420
}
424421
}

trunk/src/test/compile-fail/deref-non-pointer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern:cannot be dereferenced
1211
fn main() {
13-
match *1 {
12+
match *1 { //~ ERROR: cannot be dereferenced
1413
_ => { fail!(); }
1514
}
1615
}

0 commit comments

Comments
 (0)