Skip to content

Commit d0a89b4

Browse files
committed
note on binop methods
1 parent 34c830e commit d0a89b4

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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ use self::Ordering::*;
245245
append_const_msg
246246
)]
247247
#[rustc_diagnostic_item = "PartialEq"]
248-
#[const_trait]
249248
pub trait PartialEq<Rhs: ?Sized = Self> {
250249
/// This method tests for `self` and `other` values to be equal, and is used
251250
/// by `==`.
@@ -1463,8 +1462,7 @@ mod impls {
14631462
macro_rules! partial_eq_impl {
14641463
($($t:ty)*) => ($(
14651464
#[stable(feature = "rust1", since = "1.0.0")]
1466-
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
1467-
impl const PartialEq for $t {
1465+
impl PartialEq for $t {
14681466
#[inline]
14691467
fn eq(&self, other: &$t) -> bool { (*self) == (*other) }
14701468
#[inline]

0 commit comments

Comments
 (0)