diff options
author | Kirill Bulatov <[email protected]> | 2020-02-18 12:53:02 +0000 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-02-18 14:03:08 +0000 |
commit | b8ddcb0652f3ec8683023afc1e1f5166d6a712f4 (patch) | |
tree | ea95a1e2083280d84e99f274e5b2b8b269545297 /crates/ra_hir_ty/src/traits/builtin.rs | |
parent | eab80cd961919b9321e1d34343ae3f3adb0502e5 (diff) |
Run cargo +nightly fix --clippy -Z unstable-options
Diffstat (limited to 'crates/ra_hir_ty/src/traits/builtin.rs')
-rw-r--r-- | crates/ra_hir_ty/src/traits/builtin.rs | 6 |
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); |