-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add proc-macro-error for better error feedback to user * add trybuild for testing test * ci: remove nightly tests --------- Co-authored-by: glihm <[email protected]>
- Loading branch information
Showing
13 changed files
with
246 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#![no_main] | ||
use cainome_rs_macro::abigen; | ||
|
||
abigen!( | ||
MyContract, | ||
r#"[ | ||
{ | ||
"type": "struct", | ||
"name": "core::integer::u256", | ||
"members": [ | ||
{ | ||
"name": "low", | ||
"type": "core::integer::u128" | ||
}, | ||
{ | ||
"name": "high", | ||
"type": "core::integer::u128" | ||
} | ||
] | ||
} | ||
]"#, | ||
type_aliases { | ||
core::integer::u256 as MyStruct1; | ||
core::integer::u256 as MyStruct2; | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: core::integer::u256 duplicate abi type | ||
--> tests/abigen/duplicate_abi_type.rs:24:9 | ||
| | ||
24 | core::integer::u256 as MyStruct2; | ||
| ^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#![no_main] | ||
use cainome_rs_macro::abigen; | ||
|
||
abigen!( | ||
MyStruct, | ||
r#"[ | ||
{ | ||
"type": "struct", | ||
"name": "core::integer::u256", | ||
"members": [ | ||
{ | ||
"name": "low", | ||
"type": "core::integer::u128" | ||
}, | ||
{ | ||
"name": "high", | ||
"type": "core::integer::u128" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "struct", | ||
"name": "core::starknet::eth_address::EthAddress", | ||
"members": [ | ||
{ | ||
"name": "address", | ||
"type": "core::felt252" | ||
} | ||
] | ||
} | ||
]"#, | ||
type_aliases { | ||
core::integer::u256 as MyStruct; | ||
core::starknet::eth_address::EthAddress as MyStruct; | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: MyStruct duplicate alias name | ||
--> tests/abigen/duplicate_alias_name.rs:34:9 | ||
| | ||
34 | core::starknet::eth_address::EthAddress as MyStruct; | ||
| ^^^^ |
Oops, something went wrong.