Skip to content

Commit f2e1357

Browse files
committed
Commenting out unsound specialiation.
If perf results indicate that we need this, then we should try to emulate it via a series of implementations on concrete types.
1 parent 3291ae3 commit f2e1357

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/libcore/ops/range.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,15 @@ impl<T> RangeInclusiveEquality for T {
360360
}
361361
}
362362

363-
impl<T: PartialOrd> RangeInclusiveEquality for T {
364-
#[inline]
365-
fn canonicalized_is_empty(range: &RangeInclusive<Self>) -> bool {
366-
range.is_empty()
367-
}
368-
}
363+
// rust-lang/rust#67194: We cannot use this specialized implementation
364+
// soundly in Rust today.
365+
//
366+
// impl<T: PartialOrd> RangeInclusiveEquality for T {
367+
// #[inline]
368+
// fn canonicalized_is_empty(range: &RangeInclusive<Self>) -> bool {
369+
// range.is_empty()
370+
// }
371+
// }
369372

370373
#[stable(feature = "inclusive_range", since = "1.26.0")]
371374
impl<Idx: PartialEq> PartialEq for RangeInclusive<Idx> {

0 commit comments

Comments
 (0)