pub fn is_pragma_valid_for_block(target: &SpecBlockContext<'_>, pragma: &str) -> bool {
    use crate::builder::module_builder::SpecBlockContext::*;
    match target {
        Module => matches!(
            pragma,
            VERIFY_PRAGMA
                | EMITS_IS_STRICT_PRAGMA
                | EMITS_IS_PARTIAL_PRAGMA
                | ABORTS_IF_IS_STRICT_PRAGMA
                | ABORTS_IF_IS_PARTIAL_PRAGMA
                | INTRINSIC_PRAGMA
        ),
        Function(..) => matches!(
            pragma,
            VERIFY_PRAGMA
                | TIMEOUT_PRAGMA
                | SEED_PRAGMA
                | VERIFY_DURATION_ESTIMATE_PRAGMA
                | INTRINSIC_PRAGMA
                | OPAQUE_PRAGMA
                | EMITS_IS_STRICT_PRAGMA
                | EMITS_IS_PARTIAL_PRAGMA
                | ABORTS_IF_IS_PARTIAL_PRAGMA
                | ABORTS_IF_IS_STRICT_PRAGMA
                | REQUIRES_IF_ABORTS_PRAGMA
                | ALWAYS_ABORTS_TEST_PRAGMA
                | ADDITION_OVERFLOW_UNCHECKED_PRAGMA
                | ASSUME_NO_ABORT_FROM_HERE_PRAGMA
                | EXPORT_ENSURES_PRAGMA
                | FRIEND_PRAGMA
                | DISABLE_INVARIANTS_IN_BODY_PRAGMA
                | DELEGATE_INVARIANTS_TO_CALLER_PRAGMA
        ),
        _ => false,
    }
}
/// Checks whether a pragma is valid in a specific spec block.
Checks whether a pragma is valid in a specific spec block.
Checks whether a pragma is valid in a specific spec block .
pub fn is_pragma_valid_for_block(target: &SpecBlockContext<'_>, pragma: &str) -> bool {
    use crate::builder::module_builder::SpecBlockContext::*;
    match target {
        Module => matches!(
            pragma,
            VERIFY_PRAGMA
                | EMITS_IS_STRICT_PRAGMA
                | EMITS_IS_PARTIAL_PRAGMA
                | ABORTS_IF_IS_STRICT_PRAGMA
                | ABORTS_IF_IS_PARTIAL_PRAGMA
                | INTRINSIC_PRAGMA
        ),
        Function(..) => matches!(
            pragma,
            VERIFY_PRAGMA
                | TIMEOUT_PRAGMA
                | SEED_PRAGMA
                | VERIFY_DURATION_ESTIMATE_PRAGMA
                | INTRINSIC_PRAGMA
                | OPAQUE_PRAGMA
                | EMITS_IS_STRICT_PRAGMA
                | EMITS_IS_PARTIAL_PRAGMA
                | ABORTS_IF_IS_PARTIAL_PRAGMA
                | ABORTS_IF_IS_STRICT_PRAGMA
                | REQUIRES_IF_ABORTS_PRAGMA
                | ALWAYS_ABORTS_TEST_PRAGMA
                | ADDITION_OVERFLOW_UNCHECKED_PRAGMA
                | ASSUME_NO_ABORT_FROM_HERE_PRAGMA
                | EXPORT_ENSURES_PRAGMA
                | FRIEND_PRAGMA
                | DISABLE_INVARIANTS_IN_BODY_PRAGMA
                | DELEGATE_INVARIANTS_TO_CALLER_PRAGMA
        ),
        _ => false,
    }
}
pub fn is_pragma_valid_for_block ( target : & SpecBlockContext < ' _ > , pragma : & str ) -> bool { use crate :: builder :: module_builder :: SpecBlockContext :: * ; match target { Module => matches ! ( pragma VERIFY_PRAGMA EMITS_IS_STRICT_PRAGMA EMITS_IS_PARTIAL_PRAGMA ABORTS_IF_IS_STRICT_PRAGMA ABORTS_IF_IS_PARTIAL_PRAGMA INTRINSIC_PRAGMA ) , Function ( .. ) => matches ! ( pragma VERIFY_PRAGMA TIMEOUT_PRAGMA SEED_PRAGMA VERIFY_DURATION_ESTIMATE_PRAGMA INTRINSIC_PRAGMA OPAQUE_PRAGMA EMITS_IS_STRICT_PRAGMA EMITS_IS_PARTIAL_PRAGMA ABORTS_IF_IS_PARTIAL_PRAGMA ABORTS_IF_IS_STRICT_PRAGMA REQUIRES_IF_ABORTS_PRAGMA ALWAYS_ABORTS_TEST_PRAGMA ADDITION_OVERFLOW_UNCHECKED_PRAGMA ASSUME_NO_ABORT_FROM_HERE_PRAGMA EXPORT_ENSURES_PRAGMA FRIEND_PRAGMA DISABLE_INVARIANTS_IN_BODY_PRAGMA DELEGATE_INVARIANTS_TO_CALLER_PRAGMA ) , _ => false , } }
Checks whether a pragma is valid in a specific spec block.
Checks whether a pragma is valid in a specific spec block .
target
&SpecBlockContext<'_>
pragma
&str