diff --git a/src/librustc_mir/tcx/mod.rs b/src/librustc_mir/tcx/mod.rs index 32694bd509e..be731317482 100644 --- a/src/librustc_mir/tcx/mod.rs +++ b/src/librustc_mir/tcx/mod.rs @@ -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 @@ impl<'a,'tcx:'a> Cx<'a, 'tcx> { } } -// 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(&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;