Skip to main content

is_rust_source

Function is_rust_source 

Source
pub fn is_rust_source(path: &Path) -> bool
Expand description

Whether a path names a file rumdl reads through its Rust doc comments.

The single definition of it, because every pass that touches such a file has to agree: the lint pass, the fix pass, and the re-lint a fix run reconciles against. A pass that reads the source as markdown reports on the Rust code itself, and a fix pass that does it rewrites the Rust code, producing bytes no check ever reported (#[derive(Debug)] is an MD018 heading to a markdown fixer).