Skip to main content

Module lang_api

Module lang_api 

Source
Expand description

Compiler lang-item identities used across RAPx.

ยงAgent Rules

Keep this module limited to identifying rustc lang items and their trait methods by DefId. Do not depend on other RAPx modules.

Re-exportsยง

use rustc_hir::def_id::DefId; ๐Ÿ”’
use rustc_middle::ty::TyCtxt; ๐Ÿ”’

Enumsยง

LangItem ๐Ÿ”’
A representation of all the valid lang items in Rust.

Functionsยง

is_call_mut ๐Ÿ”’
Whether did is the FnMut::call_mut trait method.
is_clone ๐Ÿ”’
Whether did is a method of the Clone trait.
is_fn_trait ๐Ÿ”’
Whether this is one of the three callable traits.
is_panic_exit ๐Ÿ”’
The plain panic! entry point, which only consumes a static message.
is_panic_family ๐Ÿ”’
Panic lang items used as diverging exits in MIR.
matches ๐Ÿ”’
Match a compiler-provided lang item by its DefId.