Skip to content

Commit 97d1b0c

Browse files
committed
Clarify a comment.
I was confused here for a bit.
1 parent 6ac8878 commit 97d1b0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_hir_analysis/src/check/intrinsic.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ pub fn check_intrinsic_type(
199199
let split: Vec<&str> = name_str.split('_').collect();
200200
assert!(split.len() >= 2, "Atomic intrinsic in an incorrect format");
201201

202-
//We only care about the operation here
202+
// Each atomic op has variants with different suffixes (`_seq_cst`, `_acquire`, etc.). Use
203+
// string ops to strip the suffixes, because the variants all get the same treatment here.
203204
let (n_tps, inputs, output) = match split[1] {
204205
"cxchg" | "cxchgweak" => (
205206
1,

0 commit comments

Comments
 (0)