Skip to content

Commit f37bce8

Browse files
committed
---
yaml --- r: 139220 b: refs/heads/try2 c: 66770d2 h: refs/heads/master v: v3
1 parent a41d1ed commit f37bce8

18 files changed

+48
-48
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: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 6d81307a9b9f29e262164f9e358f50c186c76d76
8+
refs/heads/try2: 66770d20b3f7288145b29c70359128c0dddcb992
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/test/compile-fail/regions-infer-contravariance-due-to-immutability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn to_shorter_lifetime(bi: contravariant<'r>) {
2020
let bj: contravariant<'blk> = bi;
2121
}
2222

23-
fn to_longer_lifetime(bi: contravariant<'r>) -> contravariant/&static {
23+
fn to_longer_lifetime(bi: contravariant<'r>) -> contravariant<'static> {
2424
bi //~ ERROR mismatched types
2525
}
2626

branches/try2/src/test/compile-fail/regions-infer-contravariance-due-to-ret.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
// You can upcast to a *smaller region* but not a larger one. This is
1414
// the normal case.
1515

16-
struct contravariant {
16+
struct contravariant<'self> {
1717
f: @fn() -> &'self int
1818
}
1919

20-
fn to_same_lifetime(bi: contravariant/&r) {
21-
let bj: contravariant/&r = bi;
20+
fn to_same_lifetime<'r>(bi: contravariant<'r>) {
21+
let bj: contravariant<'r> = bi;
2222
}
2323

24-
fn to_shorter_lifetime(bi: contravariant/&r) {
25-
let bj: contravariant/&blk = bi;
24+
fn to_shorter_lifetime<'r>(bi: contravariant<'r>) {
25+
let bj: contravariant<'blk> = bi;
2626
}
2727

28-
fn to_longer_lifetime(bi: contravariant/&r) -> contravariant/&static {
28+
fn to_longer_lifetime<'r>(bi: contravariant<'r>) -> contravariant<'static> {
2929
bi //~ ERROR mismatched types
3030
}
3131

branches/try2/src/test/compile-fail/regions-infer-covariance-due-to-arg.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ struct covariant {
1616
f: @fn(x: &'self int) -> int
1717
}
1818

19-
fn to_same_lifetime(bi: covariant/&r) {
20-
let bj: covariant/&r = bi;
19+
fn to_same_lifetime<'r>(bi: covariant<'r>) {
20+
let bj: covariant<'r> = bi;
2121
}
2222

23-
fn to_shorter_lifetime(bi: covariant/&r) {
24-
let bj: covariant/&blk = bi; //~ ERROR mismatched types
23+
fn to_shorter_lifetime<'r>(bi: covariant<'r>) {
24+
let bj: covariant<'blk> = bi; //~ ERROR mismatched types
2525
}
2626

27-
fn to_longer_lifetime(bi: covariant/&r) -> covariant/&static {
27+
fn to_longer_lifetime<'r>(bi: covariant<'r>) -> covariant<'static> {
2828
bi
2929
}
3030

branches/try2/src/test/compile-fail/regions-infer-invariance-due-to-arg-and-ret.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
//
1313
// You cannot convert between regions.
1414

15-
struct invariant {
15+
struct invariant<'self> {
1616
f: &'self fn(x: &'self int) -> &'self int
1717
}
1818

19-
fn to_same_lifetime(bi: invariant<'r>) {
19+
fn to_same_lifetime<'r>(bi: invariant<'r>) {
2020
let bj: invariant<'r> = bi;
2121
}
2222

23-
fn to_shorter_lifetime(bi: invariant<'r>) {
23+
fn to_shorter_lifetime<'r>(bi: invariant<'r>) {
2424
let bj: invariant<'blk> = bi; //~ ERROR mismatched types
2525
}
2626

27-
fn to_longer_lifetime(bi: invariant<'r>) -> invariant/&static {
27+
fn to_longer_lifetime<'r>(bi: invariant<'r>) -> invariant<'static> {
2828
bi //~ ERROR mismatched types
2929
}
3030

branches/try2/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs

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

11-
struct invariant {
11+
struct invariant<'self> {
1212
f: @fn(x: @mut &'self int)
1313
}
1414

15-
fn to_same_lifetime(bi: invariant/&r) {
16-
let bj: invariant/&r = bi;
15+
fn to_same_lifetime<'r>(bi: invariant<'r>) {
16+
let bj: invariant<'r> = bi;
1717
}
1818

19-
fn to_shorter_lifetime(bi: invariant/&r) {
20-
let bj: invariant/&blk = bi; //~ ERROR mismatched types
19+
fn to_shorter_lifetime(bi: invariant<'r>) {
20+
let bj: invariant<'blk> = bi; //~ ERROR mismatched types
2121
}
2222

23-
fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
23+
fn to_longer_lifetime(bi: invariant<'r>) -> invariant<'static> {
2424
bi //~ ERROR mismatched types
2525
}
2626

branches/try2/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs

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

11-
struct invariant {
11+
struct invariant<'self> {
1212
f: @fn() -> @mut &'self int
1313
}
1414

15-
fn to_same_lifetime(bi: invariant/&r) {
16-
let bj: invariant/&r = bi;
15+
fn to_same_lifetime(bi: invariant<'r>) {
16+
let bj: invariant<'r> = bi;
1717
}
1818

19-
fn to_shorter_lifetime(bi: invariant/&r) {
20-
let bj: invariant/&blk = bi; //~ ERROR mismatched types
19+
fn to_shorter_lifetime(bi: invariant<'r>) {
20+
let bj: invariant<'blk> = bi; //~ ERROR mismatched types
2121
}
2222

23-
fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
23+
fn to_longer_lifetime(bi: invariant<'r>) -> invariant<'static> {
2424
bi //~ ERROR mismatched types
2525
}
2626

branches/try2/src/test/compile-fail/regions-infer-invariance-due-to-mutability.rs

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

11-
struct invariant {
11+
struct invariant<'self> {
1212
f: @mut &'self int
1313
}
1414

15-
fn to_same_lifetime(bi: invariant<'r>) {
15+
fn to_same_lifetime<'r>(bi: invariant<'r>) {
1616
let bj: invariant<'r> = bi;
1717
}
1818

19-
fn to_shorter_lifetime(bi: invariant<'r>) {
19+
fn to_shorter_lifetime<'r>(bi: invariant<'r>) {
2020
let bj: invariant<'blk> = bi; //~ ERROR mismatched types
2121
}
2222

23-
fn to_longer_lifetime(bi: invariant<'r>) -> invariant/&static {
23+
fn to_longer_lifetime<'r>(bi: invariant<'r>) -> invariant<'static> {
2424
bi //~ ERROR mismatched types
2525
}
2626

branches/try2/src/test/compile-fail/regions-trait-3.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
// option. This file may not be copied, modified, or distributed
1212
// except according to those terms.
1313

14-
trait get_ctxt {
14+
trait get_ctxt<'self> {
1515
fn get_ctxt(self) -> &'self uint;
1616
}
1717

18-
fn make_gc1(gc: @get_ctxt/&a) -> @get_ctxt/&b {
18+
fn make_gc1(gc: @get_ctxt<'a>) -> @get_ctxt<'b> {
1919
return gc; //~ ERROR mismatched types: expected `@get_ctxt/&b` but found `@get_ctxt/&a`
2020
}
2121

@@ -27,7 +27,7 @@ impl get_ctxt for Foo<'self> {
2727
fn get_ctxt(&self) -> &'self uint { self.r }
2828
}
2929

30-
fn make_gc2(foo: Foo/&a) -> @get_ctxt/&b {
30+
fn make_gc2<'a,'b>(foo: Foo<'a>) -> @get_ctxt<'b> {
3131
return @foo as @get_ctxt; //~ ERROR cannot infer an appropriate lifetime
3232
}
3333

branches/try2/src/test/run-pass/const-fn-val.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn foo() -> int {
1414

1515
struct Bar { f: &'self fn() -> int }
1616

17-
static b : Bar/&static = Bar { f: foo };
17+
static b : Bar<'static> = Bar { f: foo };
1818

1919
pub fn main() {
2020
fail_unless!((b.f)() == 0xca7f000d);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ struct font {
1212
fontbuf: &'self ~[u8],
1313
}
1414

15-
pub impl font/&self {
15+
pub impl<'self> font<'self> {
1616
fn buf(&self) -> &'self ~[u8] {
1717
self.fontbuf
1818
}
1919
}
2020

21-
fn font(fontbuf: &'r ~[u8]) -> font/&r {
21+
fn font(fontbuf: &'r ~[u8]) -> font<'r> {
2222
font {
2323
fontbuf: fontbuf
2424
}

branches/try2/src/test/run-pass/issue-2735-2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ struct defer {
1414
}
1515

1616
#[unsafe_destructor]
17-
impl Drop for defer/&self {
17+
impl<'self> Drop for defer<'self> {
1818
fn finalize(&self) {
1919
unsafe {
2020
*(self.b) = true;
2121
}
2222
}
2323
}
2424

25-
fn defer(b: &'r mut bool) -> defer/&r {
25+
fn defer<'r>(b: &'r mut bool) -> defer<'r> {
2626
defer {
2727
b: b
2828
}

branches/try2/src/test/run-pass/issue-2735-3.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ struct defer {
1414
}
1515

1616
#[unsafe_destructor]
17-
impl Drop for defer/&self {
17+
impl<'self> Drop for defer<'self> {
1818
fn finalize(&self) {
1919
unsafe {
2020
*(self.b) = true;
2121
}
2222
}
2323
}
2424

25-
fn defer(b: &'r mut bool) -> defer/&r {
25+
fn defer(b: &'r mut bool) -> defer<'r> {
2626
defer {
2727
b: b
2828
}

branches/try2/src/test/run-pass/issue-2748-a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct CMap {
1212
buf: &'self [u8],
1313
}
1414

15-
fn CMap(buf: &'r [u8]) -> CMap/&r {
15+
fn CMap<'r>(buf: &'r [u8]) -> CMap<'r> {
1616
CMap {
1717
buf: buf
1818
}

branches/try2/src/test/run-pass/regions-copy-closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct closure_box {
1212
cl: &'self fn(),
1313
}
1414

15-
fn box_it(+x: &'r fn()) -> closure_box/&r {
15+
fn box_it<'r>(+x: &'r fn()) -> closure_box<'r> {
1616
closure_box {cl: x}
1717
}
1818

branches/try2/src/test/run-pass/regions-infer-contravariance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn with(bi: &'r boxed_int) {
2020
// Here, the upcast is allowed because the `boxed_int` type is
2121
// contravariant with respect to `&r`. See also
2222
// compile-fail/regions-infer-invariance-due-to-mutability.rs
23-
let bi: &'blk boxed_int/&blk = bi;
23+
let bi: &'blk boxed_int<'blk> = bi;
2424
fail_unless!(*get(bi) == 22);
2525
}
2626

branches/try2/src/test/run-pass/regions-mock-trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct Ccx {
2626
fn alloc(_bcx : &'a arena) -> &'a Bcx<'a> {
2727
unsafe {
2828
return cast::reinterpret_cast(
29-
&libc::malloc(sys::size_of::<Bcx/&blk>() as libc::size_t));
29+
&libc::malloc(sys::size_of::<Bcx<'blk>>() as libc::size_t));
3030
}
3131
}
3232

branches/try2/src/test/run-pass/regions-static-closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn box_it(+x: &'r fn()) -> closure_box<'r> {
1616
closure_box {cl: x}
1717
}
1818

19-
fn call_static_closure(cl: closure_box/&static) {
19+
fn call_static_closure(cl: closure_box<'static>) {
2020
(cl.cl)();
2121
}
2222

0 commit comments

Comments
 (0)