rustc_attr::builtin

Function find_const_stability

Source
pub fn find_const_stability(
    sess: &Session,
    attrs: &[Attribute],
    item_sp: Span,
    is_const_fn: bool,
) -> Option<(ConstStability, Span)>
Expand description

Collects stability info from rustc_const_stable/rustc_const_unstable/rustc_promotable attributes in attrs. Returns None if no stability attributes are found.

is_const_fn indicates whether this is a function marked as const. It will always be false for intrinsics in an extern block!