-
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
Rust 1.19 regression, 0.1.8, variant is private and cannot be reexported in pub glob #42460
Comments
Probably from #42136 What exactly is going on here that is broken? It looks like they might be reexporting private variants, but I don't see a lint in the linked PR that looks exactly like that. |
cargobomb sees this in 5-6 crates revisions, some in wide use like mustache and nickel. |
nickel inherits the breakage from mustache. |
Quite a few crates infected by mustache here. |
@brson |
@petrochenkov did we consider exempting the private variants from the |
@petrochenkov I've assigned you. |
@nikomatsakis enum E {
V,
U,
}
pub use E::*; // OK, but exports nothing, should be reported as unused import which is quite reasonable and consistent with module behavior mod m {
struct A;
struct B;
}
pub use m::*; // OK, but exports nothing, should be reported as unused import but doesn't currently There are two issues with this
As a result, I'm mildly in favor of turning this error into "unused import" warning, but I't won't help with |
Yes, I think you understood me.
In other words, it really wants the enum to be public, but it's not?
This was the precedent I was thinking of, yeah. It's sort of "as if" the enum were a mini-module -- but the analogy doesn't quite work, since if the items were truly acting like private members, then |
Yes. |
@brson unfortunately I don't have commit access to the current mustache repository. I've asked for access in nickel-org/rust-mustache#47. |
What is the current status here? I'm having second thoughts about accepting this code, given that the analogy to a module doesn't really hold up -- can we patch up the crates in question? |
@nikomatsakis |
@petrochenkov ok -- so -- is any further action needed here then? I guess we just want to see whether older versions of mustache and nickel need some sort of update? |
@nikomatsakis
Most of mustache versions are not tagged, there are also no version branches to send PRs to, and @erickt , who has publishing rights, is silent. What can we do? Wash our hands, I guess. |
OK, I am going to close as "changed due to bug fix" then. I added the relnotes tag, because this change potentially affects end users. Specifically, code like this used to compile, even though it is re-exporting private variants (Bar, Baz) as public:
We now correctly report a compilation error. |
@petrochenkov it is an older mustache but one that is a dependency of many crates. |
https://github.com/rust-locale/rust-locale
The text was updated successfully, but these errors were encountered: