]> git.lizzy.rs Git - rust.git/blob - src/test/ui/namespace/namespaced-enum-glob-import-no-impls.rs
Auto merge of #93455 - asquared31415:vec-zero-opts, r=thomcc
[rust.git] / src / test / ui / namespace / namespaced-enum-glob-import-no-impls.rs
1 mod m2 {
2     pub enum Foo {
3         A,
4         B(isize),
5         C { a: isize },
6     }
7
8     impl Foo {
9         pub fn foo() {}
10         pub fn bar(&self) {}
11     }
12 }
13
14 mod m {
15     pub use m2::Foo::*;
16 }
17
18 pub fn main() {
19     use m2::Foo::*;
20
21     foo(); //~ ERROR cannot find function `foo` in this scope
22     m::foo(); //~ ERROR cannot find function `foo` in module `m`
23     bar(); //~ ERROR cannot find function `bar` in this scope
24     m::bar(); //~ ERROR cannot find function `bar` in module `m`
25 }