Unclear visibility scope message

HI,

It might be nitpicking, but when I declare a function with pub(crate) visibility and attempt to call it outside of the crate, I get error[E0624]: associated function new is private. It is not private, it is pub(crate). It took me some time to understand, that from outside of the crate it is as good as private, and that's what rustc is referring to, but more precise error message would be nice.

Do you think this is something worth creating an issue in rust github?

Yes, I think tweaking the wording of that error is a reasonable suggestion.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.