Skip to content

Don't expose Block modules from hir #7951

@matklad

Description

@matklad

hir::Module has source, which returnsModuleSource, which stores BlockExpr as a possible variant. treating block with items as module might be fine, but we definitely should not expose this complexity to an IDE. Not sure whats the best way to achieve that though.

One approach is to add a hir::ModuleSource which asserts that the module is real, and sped the rest of our lives tracking assertion failures.

Another approach is to somehow distinguish real and fake modules in the compiler level by either turning a module into an enum, or by introducing a separate ModuleScope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-ArchitectureBig architectural things which we need to figure up-front (or suggestions for rewrites :0) )S-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions