-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.
Description
I tried this code:
fn main() {
enum Outer {
A,
B,
}
mod inner {
#[allow(unused_imports)]
use super::*; // I was hoping this would help, but doesn't...
// How do I reference the `Outer` type from here?
type Foo = Outer;
}
}
I expected to see this happen: I would expect it to compile, or to be a way of referencing Outer
.
Instead, this happened:
error[E0412]: cannot find type `Outer` in this scope
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 :)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.