cairo-lang-semantic 2.18.0

Cairo semantic model.
Documentation
//! > Test instantiation.

//! > test_runner_name
test_function_diagnostics(expect_diagnostics: true)

//! > function_code
fn foo() {
    MyStruct {};
    MyEnum::a(3);
}

//! > function_name
foo

//! > module_code
#[phantom]
struct MyStruct {}

#[phantom]
enum MyEnum {
    a: felt252,
}

//! > expected_diagnostics
error[E2019]: Can not create instances of phantom types.
 --> lib.cairo:9:5
    MyStruct {};
    ^^^^^^^^^^^

error[E2019]: Can not create instances of phantom types.
 --> lib.cairo:10:5
    MyEnum::a(3);
    ^^^^^^^^^^^^

//! > ==========================================================================

//! > Attribute argument with modifier keyword.

//! > test_runner_name
test_function_diagnostics(expect_diagnostics: false)

//! > function_code
fn foo() {}

//! > function_name
foo

//! > module_code
#[cfg(ref x)]
fn f() {}

//! > expected_diagnostics