use std;

fn f() {
}

import std::net;    //~ ERROR view items must be declared at the top

fn main() {
}


use std;

fn f() {
}

import std::io::println;    //~ ERROR view items must be declared at the top

fn main() {
}


--- 
+++ 
@@ -3,7 +3,7 @@
 fn f() {
 }
 
-import std::io::println;    //~ ERROR view items must be declared at the top
+import std::net;    //~ ERROR view items must be declared at the top
 
 fn main() {
 }
test: Use a mod that exists in view-item-at-top
