diff --git a/compiler/load/src/docs.rs b/compiler/load/src/docs.rs index f5ceebf79f..6e6ec9146e 100644 --- a/compiler/load/src/docs.rs +++ b/compiler/load/src/docs.rs @@ -91,6 +91,24 @@ fn generate_module_doc<'a>( _ => (acc, None), }, + AnnotatedBody { ann_pattern, .. } => match ann_pattern.value { + Pattern::Identifier(identifier) => { + // Check if the definition is exposed + if exposed_ident_ids + .get_id(&InlinableString::from(identifier)) + .is_some() + { + let entry = DocEntry { + name: identifier.to_string(), + docs: before_comments_or_new_lines.and_then(comments_or_new_lines_to_docs), + }; + acc.push(entry); + } + (acc, None) + } + + _ => (acc, None), + }, AnnotatedBody{ ann_pattern, .. } => match ann_pattern.value { Pattern::Identifier(identifier) => {