Skip to content

Commit f22d523

Browse files
committed
count_ones: fix mismatched error messages to methods containing them
1 parent 427e19c commit f22d523

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/rustc_codegen_spirv/src/builder/intrinsics.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -404,14 +404,14 @@ impl Builder<'_, '_> {
404404
_ => {
405405
let undef = self.undef(ty).def(self);
406406
self.zombie(undef, &format!(
407-
"counting leading / trailing zeros on unsupported {ty:?} bit integer type"
407+
"count_ones() on unsupported {ty:?} bit integer type"
408408
));
409409
undef
410410
}
411411
}
412412
.with_type(u32)
413413
}
414-
_ => self.fatal("count_ones on a non-integer type"),
414+
_ => self.fatal("count_ones() on a non-integer type"),
415415
}
416416
}
417417

@@ -477,14 +477,14 @@ impl Builder<'_, '_> {
477477
_ => {
478478
let undef = self.undef(ty).def(self);
479479
self.zombie(undef, &format!(
480-
"counting leading / trailing zeros on unsupported {ty:?} bit integer type"
480+
"bit_reverse() on unsupported {ty:?} bit integer type"
481481
));
482482
undef
483483
}
484484
}
485485
.with_type(ty)
486486
}
487-
_ => self.fatal("count_ones on a non-integer type"),
487+
_ => self.fatal("bit_reverse() on a non-integer type"),
488488
}
489489
}
490490

@@ -569,7 +569,7 @@ impl Builder<'_, '_> {
569569
_ => {
570570
let undef = self.undef(ty).def(self);
571571
self.zombie(undef, &format!(
572-
"counting leading / trailing zeros on unsupported {ty:?} bit integer type"
572+
"count_leading_trailing_zeros() on unsupported {ty:?} bit integer type"
573573
));
574574
undef
575575
}
@@ -590,7 +590,7 @@ impl Builder<'_, '_> {
590590
}
591591
.with_type(u32)
592592
}
593-
_ => self.fatal("counting leading / trailing zeros on a non-integer type"),
593+
_ => self.fatal("count_leading_trailing_zeros() on a non-integer type"),
594594
}
595595
}
596596

0 commit comments

Comments
 (0)