Skip to content

Commit 4b0afe4

Browse files
committed
note on binop methods
1 parent 0a07bbd commit 4b0afe4

File tree

2 files changed

+3
-3
lines changed
  • compiler/rustc_hir_typeck/src/method
  • library/core/src

2 files changed

+3
-3
lines changed

compiler/rustc_hir_typeck/src/method/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
395395
debug!("lookup_in_trait_adjusted: method_item={:?}", method_item);
396396
let mut obligations = vec![];
397397

398+
// TODO there is something wrong here because now methods for binops may get `const host: bool`
399+
398400
// Instantiate late-bound regions and substitute the trait
399401
// parameters into the method type to get the actual method type.
400402
//

library/core/src/cmp.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ use self::Ordering::*;
224224
append_const_msg
225225
)]
226226
#[rustc_diagnostic_item = "PartialEq"]
227-
#[const_trait]
228227
pub trait PartialEq<Rhs: ?Sized = Self> {
229228
/// This method tests for `self` and `other` values to be equal, and is used
230229
/// by `==`.
@@ -1419,8 +1418,7 @@ mod impls {
14191418
macro_rules! partial_eq_impl {
14201419
($($t:ty)*) => ($(
14211420
#[stable(feature = "rust1", since = "1.0.0")]
1422-
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
1423-
impl const PartialEq for $t {
1421+
impl PartialEq for $t {
14241422
#[inline]
14251423
fn eq(&self, other: &$t) -> bool { (*self) == (*other) }
14261424
#[inline]

0 commit comments

Comments
 (0)