-
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
allow_internal_unstable silently ignores typos in feature names #77226
Comments
Soooo... I've tried doing this, but apparently, some features are not features 👀:
|
@bugadani there are lib features and lang features. Only the second type is hardcoded in the compiler. For the first type, you need to check whether it's been declared in one of the upstream crates. |
As far as I can tell, lib features aren't available at the point of macro expansion. At least I can't see a way to list those, but let me know if I missed something. This means that fixing this issue is far from trivial. |
Somewhat related to #69399, as |
Technically, all the attribute does is plain string comparison. In fact, |
Ah, it only doesn't accept library functions in certain places. So it's less relevant than I thought. |
While working on #77088 I wasted a lot of time looking for a bug in my code, when the issue was that I made a typo in the feature name in my test case.
I think it would make sense to check that the feature to be allowed actually exists.
The text was updated successfully, but these errors were encountered: