File tree 4 files changed +83
-0
lines changed
4 files changed +83
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ #[ feature( managed_boxes) ] ;
12
+
13
+ use std:: hashmap:: HashMap ;
14
+
15
+ pub type map = @HashMap < uint , uint > ;
Original file line number Diff line number Diff line change
1
+ // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ enum v { }
12
+ pub fn main ( ) {
13
+ let y: v = unsafe { :: std:: unstable:: intrinsics:: uninit ( ) } ;
14
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ // aux-build:issue-5521.rs
12
+ // xfail-fast
13
+
14
+ #[ feature( managed_boxes) ] ;
15
+
16
+ extern mod foo = "issue-5521" ;
17
+
18
+ fn foo ( a : foo:: map ) {
19
+ if false {
20
+ fail ! ( ) ;
21
+ } else {
22
+ let _b = a. get ( & 2 ) ;
23
+ }
24
+ }
25
+
26
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ use std:: comm;
12
+ use std:: io:: timer:: Timer ;
13
+
14
+ pub fn main ( ) {
15
+ let ( port, chan) = Chan :: new ( ) ;
16
+ spawn ( proc ( ) {
17
+ let mut timer = Timer :: new ( ) . unwrap ( ) ;
18
+ timer. sleep ( 10 ) ;
19
+ chan. send ( ( ) ) ;
20
+ } ) ;
21
+ loop {
22
+ match port. try_recv ( ) {
23
+ comm:: Data ( ( ) ) => break ,
24
+ comm:: Empty => { }
25
+ comm:: Disconnected => unreachable ! ( )
26
+ }
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments