diff options
Diffstat (limited to 'crates/ra_hir/src/generics.rs')
-rw-r--r-- | crates/ra_hir/src/generics.rs | 4 |
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 | ||
200 | pub trait HasGenericParams { | 200 | pub 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 | ||
204 | impl<T> HasGenericParams for T | 204 | impl<T> HasGenericParams for T |
205 | where | 205 | where |
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()) |