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 // FIXME: Remove when `item_like_imports` is stabilized.
13 // aux-build:namespace-mix-old.rs
15 #![feature(relaxed_adts)]
17 extern crate namespace_mix_old
;
18 use namespace_mix_old
::{xm1, xm2, xm3, xm4, xm5, xm6, xm7, xm8, xm9, xmA, xmB, xmC}
;
38 // Use something emitting the type argument name, e.g. unsatisfied bound.
40 fn check
<T
: Impossible
>(_
: T
) {}
44 pub type S
= ::c
::Item
;
48 pub const S
: ::c
::Item
= ::c
::Item
;
52 check(m1
::S{}
); //~ ERROR c::Item
53 check(m1
::S
); //~ ERROR unresolved name
54 check(m2
::S{}
); //~ ERROR c::S
55 check(m2
::S
); //~ ERROR c::Item
58 check(xm1
::S{}
); //~ ERROR c::Item
59 check(xm1
::S
); //~ ERROR unresolved name
60 check(xm2
::S{}
); //~ ERROR c::S
61 check(xm2
::S
); //~ ERROR c::Item
66 pub type TS
= ::c
::Item
;
70 pub const TS
: ::c
::Item
= ::c
::Item
;
74 check(m3
::TS{}
); //~ ERROR c::Item
75 check(m3
::TS
); //~ ERROR c::TS
76 check(m4
::TS{}
); //~ ERROR c::TS
77 check(m4
::TS
); //~ ERROR c::Item
80 check(xm3
::TS{}
); //~ ERROR c::Item
81 check(xm3
::TS
); //~ ERROR c::TS
82 check(xm4
::TS{}
); //~ ERROR c::TS
83 check(xm4
::TS
); //~ ERROR c::Item
88 pub type US
= ::c
::Item
;
92 pub const US
: ::c
::Item
= ::c
::Item
;
96 check(m5
::US{}
); //~ ERROR c::Item
97 check(m5
::US
); //~ ERROR c::US
98 check(m6
::US{}
); //~ ERROR c::US
99 check(m6
::US
); //~ ERROR c::Item
102 check(xm5
::US{}
); //~ ERROR c::Item
103 check(xm5
::US
); //~ ERROR c::US
104 check(xm6
::US{}
); //~ ERROR c::US
105 check(xm6
::US
); //~ ERROR c::Item
110 pub type V
= ::c
::Item
;
114 pub const V
: ::c
::Item
= ::c
::Item
;
118 check(m7
::V{}
); //~ ERROR c::Item
119 check(m7
::V
); //~ ERROR name of a struct or struct variant
120 check(m8
::V{}
); //~ ERROR c::E
121 check(m8
::V
); //~ ERROR c::Item
124 check(xm7
::V{}
); //~ ERROR c::Item
125 check(xm7
::V
); //~ ERROR name of a struct or struct variant
126 check(xm8
::V{}
); //~ ERROR c::E
127 check(xm8
::V
); //~ ERROR c::Item
132 pub type TV
= ::c
::Item
;
136 pub const TV
: ::c
::Item
= ::c
::Item
;
140 check(m9
::TV{}
); //~ ERROR c::Item
141 check(m9
::TV
); //~ ERROR c::E
142 check(mA
::TV{}
); //~ ERROR c::E
143 check(mA
::TV
); //~ ERROR c::Item
146 check(xm9
::TV{}
); //~ ERROR c::Item
147 check(xm9
::TV
); //~ ERROR c::E
148 check(xmA
::TV{}
); //~ ERROR c::E
149 check(xmA
::TV
); //~ ERROR c::Item
154 pub type UV
= ::c
::Item
;
158 pub const UV
: ::c
::Item
= ::c
::Item
;
162 check(mB
::UV{}
); //~ ERROR c::Item
163 check(mB
::UV
); //~ ERROR c::E
164 check(mC
::UV{}
); //~ ERROR c::E
165 check(mC
::UV
); //~ ERROR c::Item
168 check(xmB
::UV{}
); //~ ERROR c::Item
169 check(xmB
::UV
); //~ ERROR c::E
170 check(xmC
::UV{}
); //~ ERROR c::E
171 check(xmC
::UV
); //~ ERROR c::Item