File tree Expand file tree Collapse file tree 4 files changed +15
-16
lines changed
branches/try/src/test/compile-fail Expand file tree Collapse file tree 4 files changed +15
-16
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 19dfec2aaf746535de1521f68421f9980dbf25de
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5
- refs/heads/try: 15871a7458feee550c9ba65db802ed0fb5db2ae7
5
+ refs/heads/try: 58ec84a098376860c2126389938b340fbb810d78
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
Original file line number Diff line number Diff line change 10
10
11
11
#[ forbid( heap_memory) ] ;
12
12
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
16
18
17
19
fn main ( ) {
18
- let _x : { x : ~ int } = { x : ~10 } ;
20
+ let _x : Bar = Bar { x : ~10 } ;
19
21
//~^ ERROR type uses owned
20
- //~^^ ERROR type uses owned
21
22
}
Original file line number Diff line number Diff line change 10
10
11
11
#[ forbid( managed_heap_memory) ] ;
12
12
13
- type Foo = { //~ ERROR type uses managed
14
- x : @int
15
- } ;
13
+ struct Foo {
14
+ x : @int //~ ERROR type uses managed
15
+ }
16
16
17
17
fn main ( ) {
18
- let _x : Foo = { x : @10 } ;
18
+ let _x : Foo = Foo { x : @10 } ;
19
19
//~^ ERROR type uses managed
20
- //~^^ ERROR type uses managed
21
20
}
Original file line number Diff line number Diff line change 10
10
11
11
#[ forbid( owned_heap_memory) ] ;
12
12
13
- type Foo = { //~ ERROR type uses owned
14
- x : ~int
15
- } ;
13
+ struct Foo {
14
+ x : ~int //~ ERROR type uses owned
15
+ }
16
16
17
17
fn main ( ) {
18
- let _x : Foo = { x : ~10 } ;
18
+ let _x : Foo = Foo { x : ~10 } ;
19
19
//~^ ERROR type uses owned
20
- //~^^ ERROR type uses owned
21
20
}
You can’t perform that action at this time.
0 commit comments