]> git.lizzy.rs Git - rust.git/blob - src/test/ui/use/use-from-trait.rs
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[rust.git] / src / test / ui / use / use-from-trait.rs
1 use Trait::foo; //~ ERROR `foo` is not directly importable
2 use Trait::Assoc; //~ ERROR `Assoc` is not directly importable
3 use Trait::C; //~ ERROR `C` is not directly importable
4
5 use Foo::new; //~ ERROR unresolved import `Foo` [E0432]
6
7 use Foo::C2; //~ ERROR unresolved import `Foo` [E0432]
8
9 pub trait Trait {
10     fn foo();
11     type Assoc;
12     const C: u32;
13 }
14
15 struct Foo;
16
17 impl Foo {
18     fn new() {}
19     const C2: u32 = 0;
20 }
21
22 fn main() {}