Is there a way to include something into documentation scope without including it into the code scope? My Rustdoc links to a Trait that's not in the code scope. If I add use std::ops::Add
at the top, I get unused import
warning from cargo build
. If I don't add it, I get unresolved link
warning from cargo doc
.
In theory, cargo build
should not warn me because rustdoc is in the same scope as the main code, but it does.
/// [Add]
pub fn foo() {}