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

14 lines
316 B
Rust
Raw Normal View History

// 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 {
2011-07-27 14:19:39 +02:00
use std;
import vec;
fn f() -> [int] { vec::init_elt(1u, 0) }
}
fn main() { let x = m::f(); }