aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r--crates/ra_hir_def/src/generics.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs
index f794eefbc..9e2e4c3cc 100644
--- a/crates/ra_hir_def/src/generics.rs
+++ b/crates/ra_hir_def/src/generics.rs
@@ -25,7 +25,6 @@ pub struct GenericParam {
25/// Data about the generic parameters of a function, struct, impl, etc. 25/// Data about the generic parameters of a function, struct, impl, etc.
26#[derive(Clone, PartialEq, Eq, Debug)] 26#[derive(Clone, PartialEq, Eq, Debug)]
27pub struct GenericParams { 27pub struct GenericParams {
28 pub def: GenericDefId,
29 pub parent_params: Option<Arc<GenericParams>>, 28 pub parent_params: Option<Arc<GenericParams>>,
30 pub params: Vec<GenericParam>, 29 pub params: Vec<GenericParam>,
31 pub where_predicates: Vec<WherePredicate>, 30 pub where_predicates: Vec<WherePredicate>,
@@ -56,7 +55,7 @@ impl GenericParams {
56 parent_params: Option<Arc<GenericParams>>, 55 parent_params: Option<Arc<GenericParams>>,
57 ) -> GenericParams { 56 ) -> GenericParams {
58 let mut generics = 57 let mut generics =
59 GenericParams { def, params: Vec::new(), parent_params, where_predicates: Vec::new() }; 58 GenericParams { params: Vec::new(), parent_params, where_predicates: Vec::new() };
60 let start = generics.parent_params.as_ref().map(|p| p.params.len()).unwrap_or(0) as u32; 59 let start = generics.parent_params.as_ref().map(|p| p.params.len()).unwrap_or(0) as u32;
61 // FIXME: add `: Sized` bound for everything except for `Self` in traits 60 // FIXME: add `: Sized` bound for everything except for `Self` in traits
62 match def { 61 match def {