about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-10-20 10:35:51 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-10-21 13:45:21 +1100
commit77c50dc508b8a0ea4277db6860c8d86288fd8538 (patch)
tree64c64848afebedeb1623d8411fd4c47b0f35c000
parentc23a7aa778b0dfeffbf83b099bdf971242c1e1ac (diff)
downloadrust-77c50dc508b8a0ea4277db6860c8d86288fd8538.tar.gz
rust-77c50dc508b8a0ea4277db6860c8d86288fd8538.zip
Remove unnecessary trait bounds from `keys::Keys`.
-rw-r--r--src/librustc/ty/query/keys.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/librustc/ty/query/keys.rs b/src/librustc/ty/query/keys.rs
index 30a3e53dddf..f61801cd232 100644
--- a/src/librustc/ty/query/keys.rs
+++ b/src/librustc/ty/query/keys.rs
@@ -8,14 +8,12 @@ use crate::ty::subst::SubstsRef;
 use crate::ty::fast_reject::SimplifiedType;
 use crate::mir;
 
-use std::fmt::Debug;
-use std::hash::Hash;
 use syntax_pos::{Span, DUMMY_SP};
 use syntax_pos::symbol::InternedString;
 
 /// The `Key` trait controls what types can legally be used as the key
 /// for a query.
-pub(super) trait Key: Clone + Hash + Eq + Debug {
+pub(super) trait Key {
     /// Given an instance of this key, what crate is it referring to?
     /// This is used to find the provider.
     fn query_crate(&self) -> CrateNum;
@@ -201,10 +199,7 @@ impl Key for InternedString {
 
 /// Canonical query goals correspond to abstract trait operations that
 /// are not tied to any crate in particular.
-impl<'tcx, T> Key for Canonical<'tcx, T>
-where
-    T: Debug + Hash + Clone + Eq,
-{
+impl<'tcx, T> Key for Canonical<'tcx, T> {
     fn query_crate(&self) -> CrateNum {
         LOCAL_CRATE
     }