Skip to content

Commit 2bd96ad

Browse files
committed
review
1 parent ea10576 commit 2bd96ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

near-sdk-macros/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn check_duplicate_contract_state() -> bool {
6666
static CONTRACT_STATE_DEFINED: ::std::sync::atomic::AtomicBool =
6767
::std::sync::atomic::AtomicBool::new(false);
6868

69-
CONTRACT_STATE_DEFINED.swap(true, ::std::sync::atomic::Ordering::SeqCst)
69+
CONTRACT_STATE_DEFINED.swap(true, ::std::sync::atomic::Ordering::AcqRel)
7070
}
7171

7272
#[proc_macro_attribute]
@@ -100,7 +100,7 @@ pub fn near(attr: TokenStream, item: TokenStream) -> TokenStream {
100100
return TokenStream::from(
101101
syn::Error::new(
102102
Span::call_site(),
103-
"The `near` macro cannot be nested with other `near` or `near_bindgen` macros. Please comma-separate the attributes instead of nesting them",
103+
"#[near] or #[near_bindgen] attributes are not allowed to be nested inside of the outmost #[near] attribute. Only a single #[near] attribute is allowed",
104104
)
105105
.to_compile_error(),
106106
);

near-sdk/compilation_tests/nested_near_error.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: The `near` macro cannot be nested with other `near` or `near_bindgen` macros. Please comma-separate the attributes instead of nesting them
1+
error: #[near] or #[near_bindgen] attributes are not allowed to be nested inside of the outmost #[near] attribute. Only a single #[near] attribute is allowed
22
--> compilation_tests/nested_near_error.rs:5:1
33
|
44
5 | #[near(contract_state)]

0 commit comments

Comments
 (0)