Skip to content

Commit 58ec84a

Browse files
committed
testsuite: Remove structural records from remaining compile-fail tests
1 parent 15871a7 commit 58ec84a

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

src/test/compile-fail/lint-heap-memory.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010

1111
#[forbid(heap_memory)];
1212

13-
type Foo = { //~ ERROR type uses managed
14-
x: @int
15-
};
13+
struct Foo {
14+
x: @int //~ ERROR type uses managed
15+
}
16+
17+
struct Bar { x: ~int } //~ ERROR type uses owned
1618

1719
fn main() {
18-
let _x : { x : ~int } = {x : ~10};
20+
let _x : Bar = Bar {x : ~10};
1921
//~^ ERROR type uses owned
20-
//~^^ ERROR type uses owned
2122
}

src/test/compile-fail/lint-managed-heap-memory.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010

1111
#[forbid(managed_heap_memory)];
1212

13-
type Foo = { //~ ERROR type uses managed
14-
x: @int
15-
};
13+
struct Foo {
14+
x: @int //~ ERROR type uses managed
15+
}
1616

1717
fn main() {
18-
let _x : Foo = {x : @10};
18+
let _x : Foo = Foo {x : @10};
1919
//~^ ERROR type uses managed
20-
//~^^ ERROR type uses managed
2120
}

src/test/compile-fail/lint-owned-heap-memory.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010

1111
#[forbid(owned_heap_memory)];
1212

13-
type Foo = { //~ ERROR type uses owned
14-
x: ~int
15-
};
13+
struct Foo {
14+
x: ~int //~ ERROR type uses owned
15+
}
1616

1717
fn main() {
18-
let _x : Foo = {x : ~10};
18+
let _x : Foo = Foo {x : ~10};
1919
//~^ ERROR type uses owned
20-
//~^^ ERROR type uses owned
2120
}

0 commit comments

Comments
 (0)