Open
Description
mod foo {
use bar::A;
mod bar {
pub struct A {}
}
}
use foo::A;
fn main() {}
Produces the error:
error[E0603]: struct `A` is private
--> src/main.rs:9:10
|
9 | use foo::A;
| ^
It would be great if the error message said why the pub struct 'A' is private.
For example something like this:
error[E0603]: struct `A` is private because it is not exported by module foo
This would remove the head scratching time as one looks at the definition of the struct and sees the pub
visibility modifier.