[][src]Function syntax::parse::file_to_source_file

fn file_to_source_file(
    sess: &ParseSess,
    path: &Path,
    spanopt: Option<Span>
) -> Lrc<SourceFile>
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

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