about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-04-20 09:59:58 -0400
committerSteve Klabnik <steve@steveklabnik.com>2015-04-20 09:59:58 -0400
commit89ef6371e09519f595b3c9a090aa5aa48f0fe2b1 (patch)
tree59b7b518c2756a4eea5a5926c1601160bc9ae890
parent5910dc0e8e396a4af7b948b83bab03f27b414a0e (diff)
downloadrust-89ef6371e09519f595b3c9a090aa5aa48f0fe2b1.tar.gz
rust-89ef6371e09519f595b3c9a090aa5aa48f0fe2b1.zip
remove bad example from PartialEq docs
Fixes #24173
-rw-r--r--src/libcore/cmp.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index efe1179621d..dd59ceff577 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -14,27 +14,6 @@
 //! implement comparison operators. Rust programs may implement `PartialOrd` to overload the `<`,
 //! `<=`, `>`, and `>=` operators, and may implement `PartialEq` to overload the `==` and `!=`
 //! operators.
-//!
-//! For example, to define a type with a customized definition for the PartialEq operators, you
-//! could do the following:
-//!
-//! ```
-//! # #![feature(core)]
-//! struct FuzzyNum {
-//!     num: i32,
-//! }
-//!
-//! impl PartialEq for FuzzyNum {
-//!     // Our custom eq allows numbers which are near each other to be equal! :D
-//!     fn eq(&self, other: &FuzzyNum) -> bool {
-//!         (self.num - other.num).abs() < 5
-//!     }
-//! }
-//!
-//! // Now these binary operators will work when applied!
-//! assert!(FuzzyNum { num: 37 } == FuzzyNum { num: 34 });
-//! assert!(FuzzyNum { num: 25 } != FuzzyNum { num: 57 });
-//! ```
 
 #![stable(feature = "rust1", since = "1.0.0")]