aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/generics.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-05-20 23:16:21 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-05-20 23:16:21 +0100
commit4369c1c4a1f098b8e59a462afb9292137498bb43 (patch)
treeca8a3a7d60bca8e807a6597e4ec734953b4851d2 /crates/ra_hir/src/generics.rs
parent9383ae720bd294b3a89ae54cb1ecad749f30b0fa (diff)
parent765f93b8d851e5e853c844c8a279e73b4b7d965c (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.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())