Merge remote-tracking branch 'origin/main' into inspect-builtin

This commit is contained in:
Richard Feldman 2023-08-14 14:59:15 -04:00
commit 15a6bc34f4
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
183 changed files with 1793 additions and 1694 deletions

View file

@ -450,7 +450,7 @@ fn contains_unexposed_type(
false
}
Where(loc_ann, _loc_has_clauses) => {
// We assume all the abilities in the `has` clause are from exported modules.
// We assume all the abilities in the `implements` clause are from exported modules.
// TODO don't assume this! Instead, look them up and verify.
contains_unexposed_type(&loc_ann.value, exposed_module_ids, module_ids)
}
@ -553,7 +553,7 @@ fn ability_member_type_to_docs(
let has_clauses = has_clauses
.iter()
.map(|hc| {
let ast::HasClause { var, abilities } = hc.value;
let ast::ImplementsClause { var, abilities } = hc.value;
(
var.value.extract_spaces().item.to_string(),
abilities

View file

@ -2870,7 +2870,7 @@ fn update<'a>(
// # Default module
// interface Default exposes [default, getDefault]
//
// Default has default : {} -> a | a has Default
// Default implements default : {} -> a where a implements Default
//
// getDefault = \{} -> default {}
//
@ -4287,7 +4287,7 @@ fn build_header<'a>(
// created an IdentId for this, when it was imported exposed
// in a dependent module.
//
// For example, if module A has [B.{ foo }], then
// For example, if module A implements [B.{ foo }], then
// when we get here for B, `foo` will already have
// an IdentId. We must reuse that!
let ident_id = ident_ids.get_or_insert(loc_exposed.value.as_str());
@ -4311,7 +4311,7 @@ fn build_header<'a>(
// created an IdentId for this, when it was imported exposed
// in a dependent module.
//
// For example, if module A has [B.{ foo }], then
// For example, if module A implements [B.{ foo }], then
// when we get here for B, `foo` will already have
// an IdentId. We must reuse that!
let ident_id = ident_ids.get_or_insert(loc_name.value.as_str());