rustc_ast::util::comments

Function may_have_doc_links

Source
pub fn may_have_doc_links(s: &str) -> bool
Expand description

A fast conservative estimate on whether the string can contain documentation links. A pair of square brackets [] must exist in the string, but we only search for the opening bracket because brackets always go in pairs in practice.