pub struct CheckedModule {
pub canonical: Module,
pub ir: Module,
}Expand description
One module the checks built a tree for, in both the forms the compiler still needs
it. Whether it passed them is said beside it: by check_module’s Ok, or by the
empty error list of check_module_recovering’s
Outcome::Module.
The two halves answer different questions and neither is derivable from the other.
canonical is what an Interface is built from, so the modules
that import this one are checked against it; ir is what a backend
reads, and carries the solved types, the name kinds, the arities and the constructor
positions that emission needs and name resolution never did.
Fields§
§canonical: Module§ir: ModuleImplementations§
Source§impl CheckedModule
impl CheckedModule
Sourcepub fn to_interface(&self, file: Option<SourceFileId>) -> Interface
pub fn to_interface(&self, file: Option<SourceFileId>) -> Interface
This module’s Interface — canonical::Module::to_interface, which is the
half of a checked module that crosses a module boundary.
Inherent so that a caller holding a CheckedModule reaches it without importing
Checked; the body is that trait’s, so there is only one to keep correct.