aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/traits/builtin.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/traits/builtin.rs')
-rw-r--r--crates/ra_hir_ty/src/traits/builtin.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/traits/builtin.rs b/crates/ra_hir_ty/src/traits/builtin.rs
index dd41176f0..67120abf6 100644
--- a/crates/ra_hir_ty/src/traits/builtin.rs
+++ b/crates/ra_hir_ty/src/traits/builtin.rs
@@ -98,7 +98,7 @@ fn closure_fn_trait_impl_datum(
98 // the existence of the Fn trait has been checked before 98 // the existence of the Fn trait has been checked before
99 .expect("fn trait for closure impl missing"); 99 .expect("fn trait for closure impl missing");
100 100
101 let num_args: u16 = match &db.body(data.def.into())[data.expr] { 101 let num_args: u16 = match &db.body(data.def)[data.expr] {
102 Expr::Lambda { args, .. } => args.len() as u16, 102 Expr::Lambda { args, .. } => args.len() as u16,
103 _ => { 103 _ => {
104 log::warn!("closure for closure type {:?} not found", data); 104 log::warn!("closure for closure type {:?} not found", data);
@@ -118,7 +118,7 @@ fn closure_fn_trait_impl_datum(
118 let self_ty = Ty::apply_one(TypeCtor::Closure { def: data.def, expr: data.expr }, sig_ty); 118 let self_ty = Ty::apply_one(TypeCtor::Closure { def: data.def, expr: data.expr }, sig_ty);
119 119
120 let trait_ref = TraitRef { 120 let trait_ref = TraitRef {
121 trait_: trait_.into(), 121 trait_,
122 substs: Substs::build_for_def(db, trait_).push(self_ty).push(arg_ty).build(), 122 substs: Substs::build_for_def(db, trait_).push(self_ty).push(arg_ty).build(),
123 }; 123 };
124 124
@@ -139,7 +139,7 @@ fn closure_fn_trait_output_assoc_ty_value(
139) -> BuiltinImplAssocTyValueData { 139) -> BuiltinImplAssocTyValueData {
140 let impl_ = Impl::ClosureFnTraitImpl(data.clone()); 140 let impl_ = Impl::ClosureFnTraitImpl(data.clone());
141 141
142 let num_args: u16 = match &db.body(data.def.into())[data.expr] { 142 let num_args: u16 = match &db.body(data.def)[data.expr] {
143 Expr::Lambda { args, .. } => args.len() as u16, 143 Expr::Lambda { args, .. } => args.len() as u16,
144 _ => { 144 _ => {
145 log::warn!("closure for closure type {:?} not found", data); 145 log::warn!("closure for closure type {:?} not found", data);