-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Matching on an enum shouldn't require full scoping inside the match #16681
Comments
This is currently a fact of rust's module system and the way that enums are scoped in their enclosing module. You can You do not have to use the full path of an enum, just some path which resolves to the enum variant. For now though this is working as intended, so I'm going to close this. |
Maybe it was unclear but I didn't intend to show this as an error that Rust is making but as room for possible improvement, like a feature. I learned on IRC that the current behavior is intended but I thought my second Hopefully this would be a possible future improvement, though maybe after 1.0 (I know you guys are busy). You didn't seem to indicate if this type of improvement is outside the realm of possibility in the future though. |
The leading proposal I know of for this is |
Okay that's fine. Thanks for pointing me in the correct direction. |
@nick29581 It seems this should be an RFC issue. Could you clone it to RFCS (I think I'm supposed to ask you)? I just want it filed in the correct location. |
This issue has been moved to the RFCs repo: rust-lang/rfcs#421 |
I was trying to de-glob libsyntax (#11983) but this is a real nuisance there. The enums are much much bigger than this.
I hope this is clear. Let me know if it isn't.
The text was updated successfully, but these errors were encountered: