Function rustc::middle::weak_lang_items::whitelisted[][src]

pub fn whitelisted(tcx: TyCtxt, lang_item: LangItem) -> bool
🔬 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?

Returns whether the specified lang_item doesn't actually need to be present for this compilation.

Not all lang items are always required for each compilation, particularly in the case of panic=abort. In these situations some lang items are injected by crates and don't actually need to be defined in libstd.