PageRenderTime 20ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/run-pass/mod-view-items.rs

http://github.com/jruderman/rust
Rust | 13 lines | 6 code | 3 blank | 4 comment | 0 complexity | 77e8d0d9461764f67c0f64e51661b969 MD5 | raw file
 1// Test view items inside non-file-level mods
 2
 3// This is a regression test for an issue where we were failing to
 4// pretty-print such view items. If that happens again, this should
 5// begin failing.
 6
 7mod m {
 8    use std;
 9    import vec;
10    fn f() -> ~[int] { vec::from_elem(1u, 0) }
11}
12
13fn main() { let x = m::f(); }