]> git.lizzy.rs Git - rust.git/commitdiff
remove now unnecessary trait impls
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 6 Oct 2015 20:49:02 +0000 (16:49 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 6 Oct 2015 21:15:54 +0000 (17:15 -0400)
src/librustc_mir/tcx/mod.rs

index 32694bd509e81674aab5406ee1426ea1f1630575..be7313174829e0aba8a1ae638f78c6168899279e 100644 (file)
@@ -17,8 +17,6 @@
 
 use hair::*;
 use repr::*;
-use std::fmt::{Debug, Formatter, Error};
-use std::hash::{Hash, Hasher};
 
 use rustc::middle::const_eval::ConstVal;
 use rustc::middle::def_id::DefId;
@@ -153,29 +151,6 @@ fn cmp_method_ref(&mut self,
     }
 }
 
-// We only need this impl so that we do deriving for things that are
-// defined relative to the `Hair` trait. See `Hair` trait for more
-// details.
-impl<'a,'tcx> PartialEq for Cx<'a,'tcx> {
-    fn eq(&self, _: &Cx<'a,'tcx>) -> bool {
-        panic!("Cx should never ACTUALLY be compared for equality")
-    }
-}
-
-impl<'a,'tcx> Eq for Cx<'a,'tcx> { }
-
-impl<'a,'tcx> Hash for Cx<'a,'tcx> {
-    fn hash<H: Hasher>(&self, _: &mut H) {
-        panic!("Cx should never ACTUALLY be hashed")
-    }
-}
-
-impl<'a,'tcx> Debug for Cx<'a,'tcx> {
-    fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error> {
-        write!(fmt, "Tcx")
-    }
-}
-
 mod block;
 mod expr;
 mod pattern;