Skip to content

Commit

Permalink
Add better documentation for unsafe block
Browse files Browse the repository at this point in the history
  • Loading branch information
Krishna Sai Veera Reddy committed Dec 10, 2019
1 parent a30ee8e commit 1f07aa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ mod impls {
-1 => Less,
0 => Equal,
1 => Greater,
// SAFETY: Unreachable code
// SAFETY: bool as i8 returns 0 or 1, so the difference can't be anything else
_ => unsafe { unreachable_unchecked() },
}
}
Expand Down

0 comments on commit 1f07aa5

Please sign in to comment.