rust/src/test/run-pass/alias-uninit-value.rs

17 lines
313 B
Rust
Raw Normal View History

// Regression test for issue #374
2011-05-14 02:21:08 -05:00
use std;
import option;
import option::none;
2011-05-14 02:21:08 -05:00
enum sty { ty_nil, }
2011-05-14 02:21:08 -05:00
type raw_t = {struct: sty, cname: option<str>, hash: uint};
2011-05-14 02:21:08 -05:00
fn mk_raw_ty(st: sty, cname: option<str>) -> raw_t {
2011-07-27 07:19:39 -05:00
ret {struct: st, cname: cname, hash: 0u};
2011-05-14 02:21:08 -05:00
}
fn main() { mk_raw_ty(ty_nil, none::<str>); }