summary refs log tree commit diff
path: root/src/test/run-pass/mod-view-items.rs
blob: c83a6e53ebb4b950830a5cec2b732eadec81bf6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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 vec;
    fn f() -> [int] { vec::init_elt(0, 1u) }
}

fn main() { let x = m::f(); }