diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-20 23:16:21 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-20 23:16:21 +0100 |
commit | 4369c1c4a1f098b8e59a462afb9292137498bb43 (patch) | |
tree | ca8a3a7d60bca8e807a6597e4ec734953b4851d2 /crates/ra_hir/src/generics.rs | |
parent | 9383ae720bd294b3a89ae54cb1ecad749f30b0fa (diff) | |
parent | 765f93b8d851e5e853c844c8a279e73b4b7d965c (diff) |
Merge #1291
1291: add is_union to structs AST r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
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()) |