E0074

E0074#

Warning name: missing_doc

Public declaration is missing documentation.

When documentation checking is enabled, public declarations should have a docstring starting with ///. This keeps generated API documentation useful for downstream users.

Erroneous example#

///|
pub fn exposed() -> Int {
  1
}

///|
test {
  inspect(exposed(), content="1")
}

Suggestion#

Add a docstring above the public declaration.

/// Returns a stable value for the example.
pub fn exposed() -> Int {
  1
}

///|
test {
  inspect(exposed(), content="1")
}