aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/traits
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/traits')
-rw-r--r--crates/ra_hir/src/ty/traits/chalk.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs
index 74370bae9..8b77d21b4 100644
--- a/crates/ra_hir/src/ty/traits/chalk.rs
+++ b/crates/ra_hir/src/ty/traits/chalk.rs
@@ -184,6 +184,7 @@ where
184 debug!("struct_datum {:?}", struct_id); 184 debug!("struct_datum {:?}", struct_id);
185 let type_ctor = from_chalk(self.db, struct_id); 185 let type_ctor = from_chalk(self.db, struct_id);
186 // FIXME might be nicer if we can create a fake GenericParams for the TypeCtor 186 // FIXME might be nicer if we can create a fake GenericParams for the TypeCtor
187 // FIXME extract this to a method on Ty
187 let (num_params, upstream) = match type_ctor { 188 let (num_params, upstream) = match type_ctor {
188 TypeCtor::Bool 189 TypeCtor::Bool
189 | TypeCtor::Char 190 | TypeCtor::Char
@@ -192,7 +193,8 @@ where
192 | TypeCtor::Never 193 | TypeCtor::Never
193 | TypeCtor::Str => (0, true), 194 | TypeCtor::Str => (0, true),
194 TypeCtor::Slice | TypeCtor::Array | TypeCtor::RawPtr(_) | TypeCtor::Ref(_) => (1, true), 195 TypeCtor::Slice | TypeCtor::Array | TypeCtor::RawPtr(_) | TypeCtor::Ref(_) => (1, true),
195 TypeCtor::FnPtr | TypeCtor::Tuple => unimplemented!(), // FIXME tuples and FnPtr are currently variadic... we need to make the parameter number explicit 196 TypeCtor::FnPtr { num_args } => (num_args as usize + 1, true),
197 TypeCtor::Tuple { cardinality } => (cardinality as usize, true),
196 TypeCtor::FnDef(_) => unimplemented!(), 198 TypeCtor::FnDef(_) => unimplemented!(),
197 TypeCtor::Adt(adt) => { 199 TypeCtor::Adt(adt) => {
198 let generic_params = adt.generic_params(self.db); 200 let generic_params = adt.generic_params(self.db);