]>
git.proxmox.com Git - rustc.git/blob - src/test/compile-fail/namespace-mix-new.rs
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-new.rs
13 #![feature(item_like_imports, relaxed_adts)]
15 extern crate namespace_mix_new
;
16 use namespace_mix_new
::*;
31 // Use something emitting the type argument name, e.g. unsatisfied bound.
33 fn check
<T
: Impossible
>(_
: T
) {}
37 pub type S
= ::c
::Item
;
41 pub const S
: ::c
::Item
= ::c
::Item
;
45 check(m1
::S{}
); //~ ERROR c::Item
46 check(m1
::S
); //~ ERROR unresolved name
47 check(m2
::S{}
); //~ ERROR c::S
48 check(m2
::S
); //~ ERROR c::Item
51 check(xm1
::S{}
); //~ ERROR c::Item
52 check(xm1
::S
); //~ ERROR unresolved name
53 check(xm2
::S{}
); //~ ERROR c::S
54 check(xm2
::S
); //~ ERROR c::Item
59 pub type TS
= ::c
::Item
;
63 pub const TS
: ::c
::Item
= ::c
::Item
;
67 check(m3
::TS{}
); //~ ERROR c::Item
68 check(m3
::TS
); //~ ERROR c::TS
69 check(m4
::TS{}
); //~ ERROR c::TS
70 check(m4
::TS
); //~ ERROR c::Item
73 check(xm3
::TS{}
); //~ ERROR c::Item
74 check(xm3
::TS
); //~ ERROR c::TS
75 check(xm4
::TS{}
); //~ ERROR c::TS
76 check(xm4
::TS
); //~ ERROR c::Item
81 pub type US
= ::c
::Item
;
85 pub const US
: ::c
::Item
= ::c
::Item
;
89 check(m5
::US{}
); //~ ERROR c::Item
90 check(m5
::US
); //~ ERROR c::US
91 check(m6
::US{}
); //~ ERROR c::US
92 check(m6
::US
); //~ ERROR c::Item
95 check(xm5
::US{}
); //~ ERROR c::Item
96 check(xm5
::US
); //~ ERROR c::US
97 check(xm6
::US{}
); //~ ERROR c::US
98 check(xm6
::US
); //~ ERROR c::Item
103 pub type V
= ::c
::Item
;
107 pub const V
: ::c
::Item
= ::c
::Item
;
111 check(m7
::V{}
); //~ ERROR c::Item
112 check(m7
::V
); //~ ERROR name of a struct or struct variant
113 check(m8
::V{}
); //~ ERROR c::E
114 check(m8
::V
); //~ ERROR c::Item
117 check(xm7
::V{}
); //~ ERROR c::Item
118 check(xm7
::V
); //~ ERROR name of a struct or struct variant
119 check(xm8
::V{}
); //~ ERROR c::E
120 check(xm8
::V
); //~ ERROR c::Item
125 pub type TV
= ::c
::Item
;
129 pub const TV
: ::c
::Item
= ::c
::Item
;
133 check(m9
::TV{}
); //~ ERROR c::Item
134 check(m9
::TV
); //~ ERROR c::E
135 check(mA
::TV{}
); //~ ERROR c::E
136 check(mA
::TV
); //~ ERROR c::Item
139 check(xm9
::TV{}
); //~ ERROR c::Item
140 check(xm9
::TV
); //~ ERROR c::E
141 check(xmA
::TV{}
); //~ ERROR c::E
142 check(xmA
::TV
); //~ ERROR c::Item
147 pub type UV
= ::c
::Item
;
151 pub const UV
: ::c
::Item
= ::c
::Item
;
155 check(mB
::UV{}
); //~ ERROR c::Item
156 check(mB
::UV
); //~ ERROR c::E
157 check(mC
::UV{}
); //~ ERROR c::E
158 check(mC
::UV
); //~ ERROR c::Item
161 check(xmB
::UV{}
); //~ ERROR c::Item
162 check(xmB
::UV
); //~ ERROR c::E
163 check(xmC
::UV{}
); //~ ERROR c::E
164 check(xmC
::UV
); //~ ERROR c::Item