]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_typeck/src/coercion.rs
Stop passing the self-type as a separate argument.
[rust.git] / compiler / rustc_hir_typeck / src / coercion.rs
index cf3b37f0a25088e4e5f00624a8ef172df8b6475a..5062926106942b42870cb7be4590f3ab834e6639 100644 (file)
@@ -630,8 +630,7 @@ fn coerce_unsized(&self, mut source: Ty<'tcx>, mut target: Ty<'tcx>) -> CoerceRe
             cause,
             coerce_unsized_did,
             0,
-            coerce_source,
-            &[coerce_target.into()]
+            [coerce_source, coerce_target]
         )];
 
         let mut has_unsized_tuple_coercion = false;
@@ -807,7 +806,7 @@ fn coerce_dyn_star(
                 self.param_env,
                 ty::Binder::dummy(ty::TraitRef::new(
                     self.tcx.require_lang_item(hir::LangItem::PointerSized, Some(self.cause.span)),
-                    self.tcx.mk_substs_trait(a, &[]),
+                    self.tcx.mk_substs_trait(a, []),
                 ))
                 .to_poly_trait_predicate(),
             ));
@@ -1086,8 +1085,7 @@ pub fn deref_once_mutably_for_diagnostic(&self, expr_ty: Ty<'tcx>) -> Option<Ty<
             self.infcx
                 .type_implements_trait(
                     self.tcx.lang_items().deref_mut_trait()?,
-                    expr_ty,
-                    ty::List::empty(),
+                    [expr_ty],
                     self.param_env,
                 )
                 .may_apply()