Closed fuine closed 6 years ago
Yeh it looks like we're hard-coding the in $path
part here... My macro-foo is also weak, but @dtolnay posted a snippet in another crate that supports pub(crate)
and pub(in path)
. Maybe we should have a look at that?
Consider this example:
It works as intended, but if we switch
pub(in a)
topub(crate)
(both of which are valid visibility restrictions as of Rust v.1.18 and higher) we get an error:I would submit a patch, but unfortunately my macro-foo is not high enough to take on this issue alone (although if someone is willing to mentor I can try to fix this).