-
Notifications
You must be signed in to change notification settings - Fork 12.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
Can't reference function-scoped type from function-scoped module #114369
Labels
C-bug
Category: This is a bug.
Comments
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Aug 2, 2023
emilio
added a commit
to servo/rust-cssparser
that referenced
this issue
Aug 2, 2023
…nce custom types. See rust-lang/rust#114369. use super::* wouldn't be enough.
For reference the work around is servo/rust-cssparser#354. The code that wouldn't build otherwise would be this. |
github-merge-queue bot
pushed a commit
to servo/rust-cssparser
that referenced
this issue
Aug 2, 2023
…nce custom types. (#354) See rust-lang/rust#114369. use super::* wouldn't be enough.
rustbot
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Aug 10, 2023
Closing as duplicate of #79260. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this code:
I expected to see this happen: I would expect it to compile, or to be a way of referencing
Outer
.Instead, this happened:
The context is that I changed a macro from expanding to a plain function to expanding to a module (servo/rust-cssparser#353), but that broke code that used that macro with a type from a function.
A workaround I found is to just expand to an empty type and use associated functions, rather than a module, but seems unfortunate :)
The text was updated successfully, but these errors were encountered: