aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/generics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/generics.rs')
-rw-r--r--crates/ra_hir/src/generics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs
index a635c7184..79a7fa23a 100644
--- a/crates/ra_hir/src/generics.rs
+++ b/crates/ra_hir/src/generics.rs
@@ -197,13 +197,13 @@ impl From<crate::adt::AdtDef> for GenericDef {
197 } 197 }
198} 198}
199 199
200pub trait HasGenericParams { 200pub trait HasGenericParams: Copy {
201 fn generic_params(self, db: &impl DefDatabase) -> Arc<GenericParams>; 201 fn generic_params(self, db: &impl DefDatabase) -> Arc<GenericParams>;
202} 202}
203 203
204impl<T> HasGenericParams for T 204impl<T> HasGenericParams for T
205where 205where
206 T: Into<GenericDef>, 206 T: Into<GenericDef> + Copy,
207{ 207{
208 fn generic_params(self, db: &impl DefDatabase) -> Arc<GenericParams> { 208 fn generic_params(self, db: &impl DefDatabase) -> Arc<GenericParams> {
209 db.generic_params(self.into()) 209 db.generic_params(self.into())