Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upimprove error message for using unbound 'self' in macro #26946
Comments
steveklabnik
added
A-diagnostics
A-macros
labels
Jul 16, 2015
TimNN
referenced this issue
Apr 7, 2016
Closed
self in expanded macro erroneously talks about static methods #32792
This comment has been minimized.
This comment has been minimized.
|
Seems a bit vague without a test case. Closing, but feel free to reopen with more detail. |
brson
closed this
Jan 12, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
comex commentedJul 10, 2015
I just mistakenly tried to naively use
selfin a macro (which is only invoked by a method taking self), and got the error:As described in #15682, failure is intended due to hygiene. However, the error message is inaccurate, because a macro body is not a static method. It should be changed to take this case into account.