We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code results in a private-in-public error:
pub(crate) trait Foo {} pub struct Bar<T>(T); impl<T: Foo> Bar<T> { pub(crate) fn new(t: T) -> Bar<T> { Bar(t) } }
error[E0445]: crate-visible trait `Foo` in public interface --> src/lib.rs:5:1 | 1 | pub(crate) trait Foo {} | ---------- `Foo` declared as crate-visible ... 5 | / impl<T: Foo> Bar<T> { 6 | | pub(crate) fn new(t: T) -> Bar<T> { 7 | | Bar(t) 8 | | } 9 | | } | |_^ can't leak crate-visible trait
This seems wrong to me; though the impl block is on a public type, none of the methods in it are public.
The text was updated successfully, but these errors were encountered:
This currently works as expected, but #48054 is going to change the rules once implemented, so the error will no longer be reported.
Sorry, something went wrong.
OK, sounds good, thanks!
No branches or pull requests
The following code results in a private-in-public error:
This seems wrong to me; though the impl block is on a public type, none of the methods in it are public.
The text was updated successfully, but these errors were encountered: