File tree Expand file tree Collapse file tree 5 files changed +104
-7
lines changed Expand file tree Collapse file tree 5 files changed +104
-7
lines changed Original file line number Diff line number Diff line change 12
12
13
13
#![ no_implicit_prelude]
14
14
15
- use qux:: * ;
16
- use foo:: * ; //~ERROR a type named `Baz` has already been imported in this module
15
+ use qux:: * ; //~ERROR a type named `Baz` has already been imported in this module
16
+ use foo:: * ;
17
17
18
18
mod foo {
19
19
pub type Baz = isize ;
Original file line number Diff line number Diff line change 11
11
use foo:: baz;
12
12
use bar:: baz; //~ ERROR a module named `baz` has already been imported
13
13
14
- use foo:: Quux ;
15
14
use bar:: Quux ; //~ ERROR a trait named `Quux` has already been imported
15
+ use foo:: Quux ;
16
16
17
- use foo:: blah;
18
- use bar:: blah; //~ ERROR a type named `blah` has already been imported
17
+ use foo:: blah; //~ ERROR a type named `blah` has already been imported
18
+ use bar:: blah;
19
19
20
- use foo:: WOMP ;
21
- use bar:: WOMP ; //~ ERROR a value named `WOMP` has already been imported
20
+ use foo:: WOMP ; //~ ERROR a value named `WOMP` has already been imported
21
+ use bar:: WOMP ;
22
22
23
23
fn main ( ) { }
24
24
Original file line number Diff line number Diff line change
1
+ // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ #![ allow( unused_imports, dead_code) ]
12
+
13
+ mod bar {
14
+ pub use self :: middle:: * ;
15
+
16
+ mod middle {
17
+ pub use self :: baz:: Baz ;
18
+
19
+ mod baz {
20
+ pub enum Baz {
21
+ Baz1 ,
22
+ Baz2
23
+ }
24
+ }
25
+ }
26
+ }
27
+
28
+ mod foo {
29
+ use bar:: Baz :: { Baz1 , Baz2 } ;
30
+ }
31
+
32
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ mod a {
12
+ use b:: { B } ;
13
+ pub use self :: inner:: A ;
14
+
15
+ mod inner {
16
+ pub struct A ;
17
+ }
18
+ }
19
+
20
+ mod b {
21
+ use a:: { A } ;
22
+ pub use self :: inner:: B ;
23
+
24
+ mod inner {
25
+ pub struct B ;
26
+ }
27
+ }
28
+
29
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ pub mod a {
12
+ use b:: fn_b;
13
+ use c:: * ;
14
+
15
+ pub fn fn_a ( ) {
16
+ }
17
+ }
18
+
19
+ pub mod b {
20
+ use a:: fn_a;
21
+ use c:: * ;
22
+
23
+ pub fn fn_b ( ) {
24
+ }
25
+ }
26
+
27
+ pub mod c{
28
+ pub fn fn_c ( ) {
29
+ }
30
+ }
31
+
32
+ use a:: fn_a;
33
+ use b:: fn_b;
34
+
35
+ fn main ( ) {
36
+ }
You can’t perform that action at this time.
0 commit comments