Consider this program:
/// Calls `bar`.
pub fn foo() {
bar();
}
fn bar() {}
In the doc comment, bar could be linked:
/// Calls [`bar`].
pub fn foo() {
bar();
}
fn bar() {}
I'm not sure how difficult this would be to implement. I think Clippy has utilities for parsing doc comments. Perhaps the lint could walk the enclosing module and look for symbols with names that appear in the doc comments.
Consider this program:
In the doc comment,
barcould be linked:I'm not sure how difficult this would be to implement. I think Clippy has utilities for parsing doc comments. Perhaps the lint could walk the enclosing module and look for symbols with names that appear in the doc comments.