Skip to content

Commit

Permalink
Add test to self-check needs-target-has-atomic directive
Browse files Browse the repository at this point in the history
  • Loading branch information
kei519 committed Nov 27, 2024
1 parent a74764c commit cf45d77
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/ui/compiletest-self-test/only-target-has-atomic.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Check this ignored because x86_64-unknown-linux-gnu does not have 128-bit atomic operation.

//@ only-x86_64-unknown-linux-gnu
//@ needs-target-has-atomic: 128

fn main() {
#[cfg(not(target_has_atomic = "128"))]
compile_error!("target does not have 128-bit atomic operation");
}

0 comments on commit cf45d77

Please sign in to comment.