Skip to main content

first_line_of_span

Function first_line_of_span 

Source
pub fn first_line_of_span<'sm>(sm: impl HasSourceMap<'sm>, span: Span) -> Span
Expand description

Returns a new Span that extends the original Span to the first non-whitespace char of the first line.

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