rust/src/test/run-pass/mod-view-items.rs
2011-08-16 15:05:56 -07:00

14 lines
321 B
Rust

// Test view items inside non-file-level mods
// This is a regression test for an issue where we were failing to
// pretty-print such view items. If that happens again, this should
// begin failing.
mod m {
use std;
import std::vec;
fn f() -> [int] { vec::init_elt(0, 1u) }
}
fn main() { let x = m::f(); }