[][src]Function rustc_parse::file_to_source_file

fn file_to_source_file(
    sess: &ParseSess,
    path: &Path,
    spanopt: Option<Span>
) -> Lrc<SourceFile>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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.