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[E0422]: cannot find struct, variant or union type `Foo` in this scope
--> testcase.rs:4:15
|
4 | let foo = Foo {};
| ^^^ not found in this scope
|
= help: possible candidate is found in another module, you can import it into scope:
`use testmodule::Foo;`
error: aborting due to previous error
But the type can't be imported because it's private (and if it weren't, it would have already been imported).
The same error exists when calling a trait that is defined in a private type.
The text was updated successfully, but these errors were encountered:
When using a trait that would have been imported via
*
except it is not declaredpub
, the suggestion from rustc is to import the type.testcase.rs:
Compiling returns this error:
But the type can't be imported because it's private (and if it weren't, it would have already been imported).
The same error exists when calling a trait that is defined in a private type.
The text was updated successfully, but these errors were encountered: