]> git.lizzy.rs Git - rust.git/blob - tests/source/imports.rs
Merge pull request #144 from marcusklaas/single-use
[rust.git] / tests / source / imports.rs
1 // Imports.
2
3 // Long import.
4 use syntax::ast::{ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic, ItemDefaultImpl};
5 use exceedingly::looooooooooooooooooooooooooooooooooooooooooooooooooooooooooong::import::path::{ItemA,
6                                                                                                 ItemB};
7
8 use list::{
9     // Some item
10     SomeItem /* Comment */, /* Another item */ AnotherItem /* Another Comment */, // Last Item
11     LastItem
12 };
13
14 use test::{  Other          /* C   */  , /*   A   */ self  /*    B     */    };
15
16 use syntax::{self};
17 use {/* Pre-comment! */
18      Foo, Bar /* comment */};
19 use Foo::{Bar, Baz};
20 pub use syntax::ast::{Expr_, Expr, ExprAssign, ExprCall, ExprMethodCall, ExprPath};
21 use syntax::some::{};
22
23 mod Foo {
24     pub use syntax::ast::{
25         ItemForeignMod,
26         ItemImpl, 
27         ItemMac,
28         ItemMod,
29         ItemStatic, 
30         ItemDefaultImpl
31     };
32
33     mod Foo2 {
34         pub use syntax::ast::{ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic, self, ItemDefaultImpl};
35     }
36 }
37
38 fn test() {
39 use Baz::*;
40         use Qux;
41 }
42
43 // Simple imports
44 use  foo::bar::baz as baz ;
45 use bar::quux  as    kaas;
46 use  foo;