]> git.lizzy.rs Git - rust.git/blob - src/test/ui/use/use-from-trait.rs
Auto merge of #56079 - mark-i-m:patch-1, r=nikomatsakis
[rust.git] / src / test / ui / use / use-from-trait.rs
1 use Trait::foo;
2 //~^ ERROR `foo` is not directly importable
3 use Trait::Assoc;
4 //~^ ERROR `Assoc` is not directly importable
5 use Trait::C;
6 //~^ ERROR `C` is not directly importable
7
8 use Foo::new;
9 //~^ ERROR unresolved import `Foo` [E0432]
10 //~| not a module `Foo`
11
12 use Foo::C2;
13 //~^ ERROR unresolved import `Foo` [E0432]
14 //~| not a module `Foo`
15
16 pub trait Trait {
17     fn foo();
18     type Assoc;
19     const C: u32;
20 }
21
22 struct Foo;
23
24 impl Foo {
25     fn new() {}
26     const C2: u32 = 0;
27 }
28
29 fn main() {}