Skip to content

Commit 2ec5231

Browse files
committed
---
yaml --- r: 11841 b: refs/heads/master c: 0cd72d2 h: refs/heads/master i: 11839: e810458 v: v3
1 parent b96cae6 commit 2ec5231

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
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: 45d0b5f0b9bbcf97bc985fd26d64564273b7547a
2+
refs/heads/master: 0cd72d24dcf39376a4c4f74520ae614d9fb90058
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/middle/trans/base.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,6 +1849,10 @@ fn autoderef(cx: block, v: ValueRef, t: ty::t) -> result_t {
18491849
t1 = derefed.t;
18501850
v1 = derefed.v;
18511851
}
1852+
ty::ty_rptr(_, mt) {
1853+
t1 = mt.ty;
1854+
v1 = v;
1855+
}
18521856
ty::ty_res(did, inner, tps) {
18531857
t1 = ty::substitute_type_params(ccx.tcx, tps, inner);
18541858
v1 = GEPi(cx, v1, [0, 1]);

trunk/src/rustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ fn type_autoderef(cx: ctxt, t: t) -> t {
11191119
let t1 = t;
11201120
loop {
11211121
alt get(t1).struct {
1122-
ty_box(mt) | ty_uniq(mt) { t1 = mt.ty; }
1122+
ty_box(mt) | ty_uniq(mt) | ty::ty_rptr(_, mt) { t1 = mt.ty; }
11231123
ty_res(_, inner, tps) {
11241124
t1 = substitute_type_params(cx, tps, inner);
11251125
}

trunk/src/rustc/middle/typeck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ fn do_autoderef(fcx: @fn_ctxt, sp: span, t: ty::t) -> ty::t {
10581058
let t1 = t;
10591059
loop {
10601060
alt structure_of(fcx, sp, t1) {
1061-
ty::ty_box(inner) | ty::ty_uniq(inner) {
1061+
ty::ty_box(inner) | ty::ty_uniq(inner) | ty::ty_rptr(_, inner) {
10621062
alt ty::get(t1).struct {
10631063
ty::ty_var(v1) {
10641064
ty::occurs_check(fcx.ccx.tcx, sp, v1,

0 commit comments

Comments
 (0)