]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/blind-item-mixed-crate-use-item.rs
80c73e5e60b53ffe8a77023e911942a3f4939c81
[rust.git] / src / test / run-pass / blind-item-mixed-crate-use-item.rs
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 // aux-build:blind-item-mixed-crate-use-item-foo.rs
12 // aux-build:blind-item-mixed-crate-use-item-foo2.rs
13
14 mod m {
15     pub fn f<T>(_: T, _: (), _: ()) { }
16     pub fn g<T>(_: T, _: (), _: ()) { }
17 }
18
19 const BAR: () = ();
20 struct Data;
21 use m::f;
22 extern crate "blind-item-mixed-crate-use-item-foo" as foo;
23
24 fn main() {
25     const BAR2: () = ();
26     struct Data2;
27     use m::g;
28
29     extern crate "blind-item-mixed-crate-use-item-foo2" as foo2;
30
31     f(Data, BAR, foo::X);
32     g(Data2, BAR2, foo2::Y);
33 }