1 // Copyright 2016 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.
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.
11 // aux-build:namespace-mix.rs
13 extern crate namespace_mix;
29 // Use something emitting the type argument name, e.g. unsatisfied bound.
31 fn check<T: Impossible>(_: T) {}
35 pub type S = ::c::Item;
39 pub const S: ::c::Item = ::c::Item;
43 check(m1::S{}); //~ ERROR c::Item
44 check(m1::S); //~ ERROR expected value, found type alias `m1::S`
45 check(m2::S{}); //~ ERROR c::S
46 check(m2::S); //~ ERROR c::Item
49 check(xm1::S{}); //~ ERROR c::Item
50 check(xm1::S); //~ ERROR expected value, found type alias `xm1::S`
51 check(xm2::S{}); //~ ERROR c::S
52 check(xm2::S); //~ ERROR c::Item
57 pub type TS = ::c::Item;
61 pub const TS: ::c::Item = ::c::Item;
65 check(m3::TS{}); //~ ERROR c::Item
66 check(m3::TS); //~ ERROR c::TS
67 check(m4::TS{}); //~ ERROR c::TS
68 check(m4::TS); //~ ERROR c::Item
71 check(xm3::TS{}); //~ ERROR c::Item
72 check(xm3::TS); //~ ERROR c::TS
73 check(xm4::TS{}); //~ ERROR c::TS
74 check(xm4::TS); //~ ERROR c::Item
79 pub type US = ::c::Item;
83 pub const US: ::c::Item = ::c::Item;
87 check(m5::US{}); //~ ERROR c::Item
88 check(m5::US); //~ ERROR c::US
89 check(m6::US{}); //~ ERROR c::US
90 check(m6::US); //~ ERROR c::Item
93 check(xm5::US{}); //~ ERROR c::Item
94 check(xm5::US); //~ ERROR c::US
95 check(xm6::US{}); //~ ERROR c::US
96 check(xm6::US); //~ ERROR c::Item
101 pub type V = ::c::Item;
105 pub const V: ::c::Item = ::c::Item;
109 check(m7::V{}); //~ ERROR c::Item
110 check(m7::V); //~ ERROR expected value, found struct variant `m7::V`
111 check(m8::V{}); //~ ERROR c::E
112 check(m8::V); //~ ERROR c::Item
115 check(xm7::V{}); //~ ERROR c::Item
116 check(xm7::V); //~ ERROR expected value, found struct variant `xm7::V`
117 check(xm8::V{}); //~ ERROR c::E
118 check(xm8::V); //~ ERROR c::Item
123 pub type TV = ::c::Item;
127 pub const TV: ::c::Item = ::c::Item;
131 check(m9::TV{}); //~ ERROR c::Item
132 check(m9::TV); //~ ERROR c::E
133 check(mA::TV{}); //~ ERROR c::E
134 check(mA::TV); //~ ERROR c::Item
137 check(xm9::TV{}); //~ ERROR c::Item
138 check(xm9::TV); //~ ERROR c::E
139 check(xmA::TV{}); //~ ERROR c::E
140 check(xmA::TV); //~ ERROR c::Item
145 pub type UV = ::c::Item;
149 pub const UV: ::c::Item = ::c::Item;
153 check(mB::UV{}); //~ ERROR c::Item
154 check(mB::UV); //~ ERROR c::E
155 check(mC::UV{}); //~ ERROR c::E
156 check(mC::UV); //~ ERROR c::Item
159 check(xmB::UV{}); //~ ERROR c::Item
160 check(xmB::UV); //~ ERROR c::E
161 check(xmC::UV{}); //~ ERROR c::E
162 check(xmC::UV); //~ ERROR c::Item