When a doctest like this is written: `````` /// /// ``` /// extern crate mylib; /// use mylib::something; /// ... /// ``` `````` running the tests will produce an error like: ``` unresolved import `mylib::something`. Did you mean `self::mylib`? [E0432] ``` since the test code is wrapped inside a `fn main()` for execution. This is imho not clear in this algorithm description https://doc.rust-lang.org/stable/book/documentation.html