Skip to content

Commit ab59feb

Browse files
committed
---
yaml --- r: 72163 b: refs/heads/dist-snap c: 93e13e0 h: refs/heads/master i: 72161: 9a4ebba 72159: b12ff77 v: v3
1 parent 606add3 commit ab59feb

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
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 8b3c09a1038c6623528fd7ebb1d365e475d63dfc
10+
refs/heads/dist-snap: 93e13e0eee1c14ea8287e448210404f407c84d19
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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
}

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