Skip to content

Commit 93db9a6

Browse files
committed
Add comment to explain manual optimization
1 parent c01bf62 commit 93db9a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/stacked_borrows.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ impl SbTag {
4444

4545
impl PartialEq for SbTag {
4646
fn eq(&self, other: &Self) -> bool {
47+
// The codegen for the derived Partialeq is bad here and includes a branch.
48+
// Since this code is extremely hot, this is optimized here.
49+
// https://github.com/rust-lang/rust/issues/49892
4750
self.as_u64() == other.as_u64()
4851
}
4952
}

0 commit comments

Comments
 (0)