Closed
Description
Due to module loading parser has to do some not very appropriate for a parser things like
- expanding
cfg
s on modules (duplicated with expansion) - keeping the current filesystem position (duplicated with expansion)
We also don't really need to load those files until we need to incorporate their contents into NodeId
-entified AST, which happens during expansion.
The move will also mean never loading files in unconfigured code.
The loading is currently skipped only if cfg
is placed directly on the mod m;
, but not in other cases like
#[cfg(FALSE)]
mod m {
mod n; // Still loaded
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment