Skip to main content

cpp_declaration_has_native_must_use_attribute

Function cpp_declaration_has_native_must_use_attribute 

Source
pub fn cpp_declaration_has_native_must_use_attribute(
    declaration: Node<'_>,
    source: &str,
) -> bool
Expand description

Whether one declaration carries a native must-use attribute.

Attribute names are read only from structurally selected attribute nodes; an identifier with the same spelling elsewhere in the declaration cannot produce a proof. GNU’s spelling is accepted for warn_unused_result, while standard nodiscard is accepted without a namespace prefix.