-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"error: source trait is private" (fixed by adding use
of *struct*)
#21670
Comments
use
of *struct*use
of *struct*)
importing |
@arielb1 but should we be worried that importing a struct fixed things here? I am used to needing to import traits in order to be able to call their methods. I'm not clear on why importing a struct fixed things here. |
Triage: updated code, made minimal:
|
This happens because |
…ikomatsakis Fix incorrect trait privacy error This PR fixes #21670 by using the crate metadata instead of `ExternalExports` to determine if an external item is public. r? @nikomatsakis
My attempt to call
Any::get_type_id()
and use its return value of as an instance offmt::Debug
does not work without import ofstd::any::TypeId
struct: http://doc.rust-lang.org/std/any/struct.TypeId.htmlExample code:
Transcript of attempt to compile:
The text was updated successfully, but these errors were encountered: