Skip to content

Commit 1f07aa5

Browse files
author
Krishna Sai Veera Reddy
committed
Add better documentation for unsafe block
1 parent a30ee8e commit 1f07aa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/cmp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ mod impls {
11341134
-1 => Less,
11351135
0 => Equal,
11361136
1 => Greater,
1137-
// SAFETY: Unreachable code
1137+
// SAFETY: bool as i8 returns 0 or 1, so the difference can't be anything else
11381138
_ => unsafe { unreachable_unchecked() },
11391139
}
11401140
}

0 commit comments

Comments
 (0)