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