]> git.proxmox.com Git - rustc.git/blob - src/test/compile-fail/use-from-trait.rs
Imported Upstream version 0.7
[rustc.git] / src / test / compile-fail / use-from-trait.rs
1 use Trait::foo; //~ ERROR cannot import from a trait or type implementation
2 //~^ ERROR failed to resolve import
3 use Foo::new; //~ ERROR cannot import from a trait or type implementation
4 //~^ ERROR failed to resolve import
5
6 pub trait Trait {
7 fn foo();
8 }
9
10 struct Foo;
11
12 impl Foo {
13 fn new() {}
14 }
15
16 fn main() {}