Skip to content

Commit 9ba1790

Browse files
committed
---
yaml --- r: 35960 b: refs/heads/try2 c: b38092e h: refs/heads/master v: v3
1 parent 4c08997 commit 9ba1790

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: bbc46d527d70ac0bcab6c2b0763f059efc27a142
8+
refs/heads/try2: b38092e9a2b5965ab8b8e73580e4d39ed701330a
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/src/rustc/middle/ty.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,10 @@ fn subst(cx: ctxt,
14731473
fold_regions_and_ty(
14741474
cx, typ,
14751475
|r| match r {
1476-
re_bound(br_self) => substs.self_r.get(),
1476+
re_bound(br_self) => substs.self_r.expect(
1477+
#fmt("ty::subst: \
1478+
Reference to self region when given substs with no \
1479+
self region, ty = %s", ty_to_str(cx, typ))),
14771480
_ => r
14781481
},
14791482
|t| do_subst(cx, substs, t),
@@ -3910,9 +3913,11 @@ fn normalize_ty(cx: ctxt, t: t) -> t {
39103913
ty_enum(did, r) =>
39113914
match r.self_r {
39123915
Some(_) =>
3913-
// This enum has a self region. Get rid of it
3916+
// Use re_static since trans doesn't care about regions
39143917
mk_enum(cx, did,
3915-
{self_r: None, self_ty: None, tps: r.tps}),
3918+
{self_r: Some(ty::re_static),
3919+
self_ty: None,
3920+
tps: r.tps}),
39163921
None =>
39173922
t
39183923
},
@@ -3921,7 +3926,8 @@ fn normalize_ty(cx: ctxt, t: t) -> t {
39213926
match r.self_r {
39223927
Some(_) =>
39233928
// Ditto.
3924-
mk_class(cx, did, {self_r: None, self_ty: None, tps: r.tps}),
3929+
mk_class(cx, did, {self_r: Some(ty::re_static), self_ty: None,
3930+
tps: r.tps}),
39253931
None =>
39263932
t
39273933
},

branches/try2/src/test/run-pass/issue-3447.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// xfail-test
21
struct list<T> {
32
element: &self/T,
43
mut next: Option<@list<T>>
@@ -11,13 +10,13 @@ impl<T> list<T>{
1110
next: option::None
1211
};
1312

14-
self.next = Some(@newList);
13+
self.next = Some(@(move newList));
1514
}
1615
}
1716

1817
fn main() {
1918
let s = @"str";
20-
let ls: list<@str> = list {
19+
let ls = list {
2120
element: &s,
2221
next: option::None
2322
};

0 commit comments

Comments
 (0)