iter 23.1.2: load_workspace auto-injects prelude module
This commit is contained in:
@@ -1140,6 +1140,19 @@ fn workspace_error_to_diagnostic(
|
||||
"type": type_repr,
|
||||
})),
|
||||
),
|
||||
// Iter 23.1: the user named a module `prelude`, which the
|
||||
// loader reserves for the auto-injected prelude module.
|
||||
W::ReservedModuleName { name } => Some(
|
||||
ailang_check::Diagnostic::error(
|
||||
"reserved-module-name",
|
||||
format!(
|
||||
"module name {name:?} is reserved (auto-injected by the loader)"
|
||||
),
|
||||
)
|
||||
.with_ctx(serde_json::json!({
|
||||
"module": name,
|
||||
})),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user