File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
branches/auto/src/test/compile-fail Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: fe7f528e5d537adab4c9c87dbbabbd0382869516
17
+ refs/heads/auto: 7ee329e97a24d259f76c1a6e910f32aa11e07862
18
18
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
19
19
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
Original file line number Diff line number Diff line change
1
+ //xfail-test
2
+
3
+ // Creating a stack closure which references an owned pointer and then
4
+ // transferring ownership of the owned box before invoking the stack
5
+ // closure results in a crash.
6
+
7
+ fn twice ( x : ~uint ) -> uint
8
+ {
9
+ * x * 2
10
+ }
11
+
12
+ fn invoke ( f : & fn ( ) -> uint )
13
+ {
14
+ f ( ) ;
15
+ }
16
+
17
+ fn main ( )
18
+ {
19
+ let x : ~uint = ~9 ;
20
+ let sq : & fn ( ) -> uint = || { * x * * x } ;
21
+
22
+ twice ( x) ;
23
+ invoke ( sq) ;
24
+ }
You can’t perform that action at this time.
0 commit comments