File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change
1
+ //! Regression test for issue #374, where previously rustc performed conditional jumps or moves that
2
+ //! incorrectly depended on uninitialized values.
3
+ //!
4
+ //! Issue: <https://github.com/rust-lang/rust/issues/374>.
5
+
1
6
//@ run-pass
2
7
3
8
#![ allow( non_camel_case_types) ]
4
9
#![ allow( dead_code) ]
5
10
11
+ enum sty {
12
+ ty_nil,
13
+ }
6
14
7
-
8
- // Regression test for issue #374
9
-
10
-
11
- enum sty { ty_nil, }
12
-
13
- struct RawT { struct_ : sty , cname : Option < String > , hash : usize }
15
+ struct RawT {
16
+ struct_ : sty ,
17
+ cname : Option < String > ,
18
+ hash : usize ,
19
+ }
14
20
15
21
fn mk_raw_ty ( st : sty , cname : Option < String > ) -> RawT {
16
- return RawT { struct_ : st, cname : cname, hash : 0 } ;
22
+ return RawT { struct_ : st, cname : cname, hash : 0 } ;
17
23
}
18
24
19
- pub fn main ( ) { mk_raw_ty ( sty:: ty_nil, None :: < String > ) ; }
25
+ pub fn main ( ) {
26
+ mk_raw_ty ( sty:: ty_nil, None :: < String > ) ;
27
+ }
You can’t perform that action at this time.
0 commit comments