Skip to content

Commit

Permalink
Disallow single-core plus critical-section enabled simultaneously.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Dec 23, 2022
1 parent d946bc2 commit 36c3bfd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ compile_error!(
"cfg(portable_atomic_s_mode) may only be used together with cfg(portable_atomic_unsafe_assume_single_core)"
);

#[cfg(all(portable_atomic_unsafe_assume_single_core, feature="critical-section"))]
compile_error!(
"You may not enable feature `critical-section` and cfg(portable_atomic_unsafe_assume_single_core) at the same time."
);

#[cfg(any(test, feature = "std"))]
extern crate std;

Expand Down

0 comments on commit 36c3bfd

Please sign in to comment.