clippy_utils::source

Function indent_of

Source
pub fn indent_of(sess: &impl HasSession, span: Span) -> Option<usize>
Expand description

Returns the indentation of the line of a span

let x = ();
//      ^^ -- will return 0
    let x = ();
//          ^^ -- will return 4