Add documentation to Module.

This commit is contained in:
Stephen Chung
2022-07-25 17:42:15 +08:00
parent 276d4457c3
commit 492d79d8a2
4 changed files with 127 additions and 14 deletions

View File

@@ -195,6 +195,7 @@ impl AST {
/// Leading white-spaces are stripped, and each line always starts with `//!`.
#[cfg(feature = "metadata")]
#[inline(always)]
#[must_use]
pub fn doc(&self) -> &str {
&self.doc
}
@@ -211,6 +212,7 @@ impl AST {
/// Only available under `metadata`.
#[cfg(feature = "metadata")]
#[inline(always)]
#[must_use]
pub(crate) fn doc_mut(&mut self) -> &mut SmartString {
&mut self.doc
}