[][src]Function rustc_parse::file_to_source_file

pub(crate) fn file_to_source_file(
    sess: &ParseSess,
    path: &Path,
    spanopt: Option<Span>
) -> Lrc<SourceFile>

Given a session and a path and an optional span (for error reporting), adds the path to the session's source_map and returns the new source_file.