You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0433]: failed to resolve: use of undeclared type or module `Foo`
--> src/main.rs:18:5
|
18 | Foo::new();
| ^^^ use of undeclared type or module `Foo`
warning: unused import: `self::components::*`
--> src/main.rs:16:9
|
16 | use self::components::*;
| ^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
But works totally fine without derive(Clone) or with use foobar::Bar instead of use foobar::* in components module.
Working code, with "use foobar::Bar"
mod components {//use foobar::*;use foobar::Bar;#[derive(Clone)]pubstructFoo{pubbar:Bar,}implFoo{pubfnnew() -> Foo{Foo{bar:Bar}}}}fnmain(){useself::components::*;Foo::new();}
Working code, without "derive"
mod components {use foobar::*;//#[derive(Clone)]pubstructFoo{pubbar:Bar,}implFoo{pubfnnew() -> Foo{Foo{bar:Bar}}}}fnmain(){useself::components::*;Foo::new();}
Issue topic is probably confusing - I am not sure whats going on here :)
The problem:
foobar's lib.rs:
Entire repo: https://github.com/not-fl3/derivebug
This code fails to build with
But works totally fine without
derive(Clone)
or withuse foobar::Bar
instead ofuse foobar::*
in components module.Working code, with "use foobar::Bar"
Working code, without "derive"
Meta
Same both on nighly and stable:
rustc --version --verbose
:rustc --version --verbose
:The text was updated successfully, but these errors were encountered: