From f2e1357654c8a18f72e62e0efee266324020666b Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 15 Jan 2020 23:40:33 -0500 Subject: [PATCH] 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. --- src/libcore/ops/range.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/libcore/ops/range.rs b/src/libcore/ops/range.rs index d38b35165695c..93904a4f7e407 100644 --- a/src/libcore/ops/range.rs +++ b/src/libcore/ops/range.rs @@ -360,12 +360,15 @@ impl RangeInclusiveEquality for T { } } -impl RangeInclusiveEquality for T { - #[inline] - fn canonicalized_is_empty(range: &RangeInclusive) -> bool { - range.is_empty() - } -} +// rust-lang/rust#67194: We cannot use this specialized implementation +// soundly in Rust today. +// +// impl RangeInclusiveEquality for T { +// #[inline] +// fn canonicalized_is_empty(range: &RangeInclusive) -> bool { +// range.is_empty() +// } +// } #[stable(feature = "inclusive_range", since = "1.26.0")] impl PartialEq for RangeInclusive {