E0074#
Warning name: missing_doc
公开声明缺少文档。
启用文档检查时,公开声明应当带有以 /// 开头的文档字符串。这样生成的 API 文档才能对下游用户有用。
错误示例#
///|
pub fn exposed() -> Int {
1
}
///|
test {
inspect(exposed(), content="1")
}
建议#
在公开声明上方添加文档字符串。
/// Returns a stable value for the example.
pub fn exposed() -> Int {
1
}
///|
test {
inspect(exposed(), content="1")
}