Skip to content

Commit 713c58e

Browse files
authored
Rollup merge of rust-lang#139105 - ShE3py:BackendRepr-is_signed, r=compiler-errors
`BackendRepr::is_signed`: comment why this may panics Was wondering why this method could panics while the others couldn't, so quote PR rust-lang#70189.
2 parents a584cc7 + 439048e commit 713c58e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: compiler/rustc_abi/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,8 @@ impl BackendRepr {
14621462
!self.is_unsized()
14631463
}
14641464

1465-
/// Returns `true` if this is a single signed integer scalar
1465+
/// Returns `true` if this is a single signed integer scalar.
1466+
/// Sanity check: panics if this is not a scalar type (see PR #70189).
14661467
#[inline]
14671468
pub fn is_signed(&self) -> bool {
14681469
match self {

0 commit comments

Comments
 (0)