I wanted to add documentation tests to my code, but I can't seem to get a very basic example working. Here is what I have:
/// Foo function inside foo.rs
///
/// # Examples
///
/// ```
/// foo();
/// ```
fn foo() {
}
The error I get is:
<anon>:2:5: 2:8 error: unresolved name
foo
[E0425]
I also have a lib.rs but its only contents are:
// Contents of lib.rs
pub mod foo;