Skip to main content

allow_above_attrs

Function allow_above_attrs 

Source
fn allow_above_attrs(lines: &[&str], line: usize, code: &str) -> bool
Expand description

Check for // mxl::allow(<code>) on the impl line itself, or on the nearest non-attribute / non-blank line above it.

line is 1-based and points at the impl’s self_ty. Scans upward across #[…] attribute lines and blank lines (the macro attribute and any doc comments sit between the allow comment and the recorded line).