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+
16//@ run-pass
27
38#![ allow( non_camel_case_types) ]
49#![ allow( dead_code) ]
510
11+ enum sty {
12+ ty_nil,
13+ }
614
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+ }
1420
1521fn 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 } ;
1723}
1824
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