Function syntax::parse::parse_item_from_source_str [] [src]

pub fn parse_item_from_source_str(
    name: FileName,
    source: String,
    sess: &ParseSess
) -> PResult<Option<P<Item>>>
🔬 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?

Parses an item.

Returns Ok(Some(item)) when successful, Ok(None) when no item was found, and Err when a syntax error occurred.