-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Small inconsistency with self
: keyword but sometimes ident
#27899
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
The fact that you can't declare new items with keywords is certainly intended.
I suppose, Basically, I'd close this as Not-a-Bug, but need a confirmation from someone, cc @nrc |
Agree with @petrochenkov. For all the macro token classifiers, I would treat |
In the following example
self
is accepted as anident
in a macro, that is an identifier:on playpen
But the following doesn't work:
on playpen
Note: the same occurs on all current 3 channels (1.2.0, 1.3.0beta, 1.4.0nightly)
With the following error: expected identifier, found keyword
self
It's a small inconsistency, but it's there nonetheless,
self
is accepted as an identifier for using a macro but not for declaring a macro.Naturally it can't be rejected as a macro argument expecting
ident
for compatibility, and it would be weird to accept it as an identifier outside of macro arguments. But I thought this should be brought up.The text was updated successfully, but these errors were encountered: