]>
git.proxmox.com Git - rustc.git/blob - 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.
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:use_from_trait_xc.rs
13 extern crate use_from_trait_xc
;
15 use use_from_trait_xc
::Trait
::foo
;
16 //~^ ERROR `foo` is not directly importable
18 use use_from_trait_xc
::Trait
::Assoc
;
19 //~^ ERROR `Assoc` is not directly importable
21 use use_from_trait_xc
::Trait
::CONST
;
22 //~^ ERROR `CONST` is not directly importable
24 use use_from_trait_xc
::Foo
::new
;
25 //~^ ERROR unresolved import `use_from_trait_xc::Foo::new`
27 use use_from_trait_xc
::Foo
::C
;
28 //~^ ERROR unresolved import `use_from_trait_xc::Foo::C`
30 use use_from_trait_xc
::Bar
::new
as bnew
;
31 //~^ ERROR unresolved import `use_from_trait_xc::Bar::new`
33 use use_from_trait_xc
::Baz
::new
as baznew
;
34 //~^ ERROR `baznew` is not directly importable