PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/src/test/run-pass/export-abstract-tag.rs

http://github.com/jruderman/rust
Rust | 13 lines | 7 code | 4 blank | 2 comment | 0 complexity | 1d45e2b20c6b5f986175ae85bc60edd5 MD5 | raw file
 1// We can export tags without exporting the variants to create a simple
 2// sort of ADT.
 3
 4mod foo {
 5    export t;
 6    export f;
 7
 8    enum t { t1, }
 9
10    fn f() -> t { return t1; }
11}
12
13fn main() { let v: foo::t = foo::f(); }