clippy_utils::source

Function line_span

source
fn line_span(sess: &impl HasSession, span: Span) -> Span
Expand description

Extends the span to the beginning of the spans line, incl. whitespaces.

       let x = ();
//             ^^
// will be converted to
       let x = ();
// ^^^^^^^^^^^^^^