Skip to main content

Module spans

Module spans 

Source

Structs§

File
FileId
Loc
Span
A snippet of source code within a file.
SpanData
A snippet of source code within a file.

Enums§

FileName
A filename.

Functions§

combine_span
Combine some span information (useful when we need to compute the span-information of, say, a sequence).
combine_span_iter
Combine all the span information in a slice.
line_to_start_byte 🔒
Given a line number within a source file, get the byte of the start of the line. Obviously not efficient to do many times, but this is used is diagnostic paths only. The line numer is expected to be 1-based.