]> git.proxmox.com Git - rustc.git/blob - src/test/compile-fail/use-from-trait-xc.rs
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / test / compile-fail / use-from-trait-xc.rs
1 // Copyright 2014 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:use_from_trait_xc.rs
12
13 extern crate use_from_trait_xc;
14
15 use use_from_trait_xc::Trait::foo;
16 //~^ ERROR `foo` is not directly importable
17
18 use use_from_trait_xc::Trait::Assoc;
19 //~^ ERROR `Assoc` is not directly importable
20
21 use use_from_trait_xc::Trait::CONST;
22 //~^ ERROR `CONST` is not directly importable
23
24 use use_from_trait_xc::Foo::new;
25 //~^ ERROR unresolved import `use_from_trait_xc::Foo::new`
26
27 use use_from_trait_xc::Foo::C;
28 //~^ ERROR unresolved import `use_from_trait_xc::Foo::C`
29
30 use use_from_trait_xc::Bar::new as bnew;
31 //~^ ERROR unresolved import `use_from_trait_xc::Bar::new`
32
33 use use_from_trait_xc::Baz::new as baznew;
34 //~^ ERROR `baznew` is not directly importable
35
36 fn main() {}