-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support local trait impls for non-local types for unnamed free constants #7550
Comments
Yeah, I think this is a good idea! |
If there's any Then we have to stop ignoring unnamed consts here and record them as part of the containing Finally, we have to change the It is possible that there's a more optimal way of doing this though, but this should be a start. |
Maybe we should even restrict it to unnamed consts of unit type? That would be annoying to check during name resolution though. |
We can check for a literal |
Actually, thinking about it, I can't think of any reason to make an anonymous const with a different type, so it probably wouldn't help anyway. |
In following code:
(1) is local trait impls for non-local types. Currently we do not support it due to the fact that we do not want to look at the bodies of all functions and blocks. But is it possible to support this case solely, as an escape hatch for proc-macro author to workaround of lacking of proc-macro hygiene at the moment ?
What do you think about it @jonas-schievink ?
The text was updated successfully, but these errors were encountered: