]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-50187.rs
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-50187.rs
1 // Copyright 2018 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 // compile-pass
12
13 #![feature(decl_macro)]
14
15 mod type_ns {
16     pub type A = u8;
17 }
18 mod value_ns {
19     pub const A: u8 = 0;
20 }
21 mod macro_ns {
22     pub macro A() {}
23 }
24
25 mod merge2 {
26     pub use type_ns::A;
27     pub use value_ns::A;
28 }
29 mod merge3 {
30     pub use type_ns::A;
31     pub use value_ns::A;
32     pub use macro_ns::A;
33 }
34
35 mod use2 {
36     pub use merge2::A;
37 }
38 mod use3 {
39     pub use merge3::A;
40 }
41
42 fn main() {
43     type B2 = use2::A;
44     let a2 = use2::A;
45
46     type B3 = use3::A;
47     let a3 = use3::A;
48     use3::A!();
49 }