-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
unresolved import consider importing this struct through its public re-export instead (not a public re-export) #138626
Comments
It reports
But |
Yeah, I'm aware of this - just thought it was a better message than the one provided (I suppose even better would be asking if you meant to make that module public as well). Even just removing the help text in this case would be an improvement IMO. |
Yes, your suggestion is very useful. I'll try to fix it. |
…errors Note potential but private items in show_candidates Closes rust-lang#138626 . We should add potential private items to give ample hints. And for the other seemingly false positive ` pub use crate::one::Foo;` should be kept because we don't know if the user wants to import other module's items or not, and therefore should be given the full option to do so. r? compiler
Rollup merge of rust-lang#138790 - xizheyin:issue-138626, r=compiler-errors Note potential but private items in show_candidates Closes rust-lang#138626 . We should add potential private items to give ample hints. And for the other seemingly false positive ` pub use crate::one::Foo;` should be kept because we don't know if the user wants to import other module's items or not, and therefore should be given the full option to do so. r? compiler
Code
Current output
Desired output
Rationale and extra context
I found the statement that it "is a public re-export" misleading, since it is not the same type. Since the original type isn't found, the error diagnostics shouldn't assume a type on a completely different path with the same name is the one trying to be used.
Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: