Skip to main content

remove_lints_overlapping_expr

Function remove_lints_overlapping_expr 

Source
pub fn remove_lints_overlapping_expr<E: Expr + ?Sized>(
    expr: &E,
    document: &Document,
    lints: &mut Vec<Lint>,
)
Expand description

Remove lints whose character spans overlap any nonempty match of an expression.

This is useful for letting higher-level token patterns mark text ranges where otherwise valid lower-level lints should be suppressed. Expression matches are checked from every token index, including overlapping matches, and zero-width expression matches are ignored.