Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
akorchyn committed Feb 7, 2025
1 parent ea10576 commit 2bd96ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions near-sdk-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn check_duplicate_contract_state() -> bool {
static CONTRACT_STATE_DEFINED: ::std::sync::atomic::AtomicBool =
::std::sync::atomic::AtomicBool::new(false);

CONTRACT_STATE_DEFINED.swap(true, ::std::sync::atomic::Ordering::SeqCst)
CONTRACT_STATE_DEFINED.swap(true, ::std::sync::atomic::Ordering::AcqRel)
}

Check warning on line 70 in near-sdk-macros/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

near-sdk-macros/src/lib.rs#L69-L70

Added lines #L69 - L70 were not covered by tests

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

Check warning on line 106 in near-sdk-macros/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

near-sdk-macros/src/lib.rs#L100-L106

Added lines #L100 - L106 were not covered by tests
Expand Down
2 changes: 1 addition & 1 deletion near-sdk/compilation_tests/nested_near_error.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: The `near` macro cannot be nested with other `near` or `near_bindgen` macros. Please comma-separate the attributes instead of nesting them
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
--> compilation_tests/nested_near_error.rs:5:1
|
5 | #[near(contract_state)]
Expand Down

0 comments on commit 2bd96ad

Please sign in to comment.