//! > Test instantiation.
//! > test_runner_name
test_function_diagnostics(expect_diagnostics: true)
//! > function_code
fn foo() {
MyStruct {};
MyEnum::a(3);
}
//! > function_name
foo
//! > module_code
struct MyStruct {}
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
fn f() {}
//! > expected_diagnostics