fix clippy::toplevel_ref_arg and ::manual_map

This commit is contained in:
Matthias Krüger
2023-04-15 20:18:30 +02:00
parent e6e956dade
commit 543f8bc38c
12 changed files with 42 additions and 70 deletions

View File

@@ -13,7 +13,7 @@ use rustc_trait_selection::traits::{ObligationCause, ObligationCtxt};
/// Note that this does *not* recursively check if the substructure of `adt_ty`
/// implements the traits.
fn has_structural_eq_impls<'tcx>(tcx: TyCtxt<'tcx>, adt_ty: Ty<'tcx>) -> bool {
let ref infcx = tcx.infer_ctxt().build();
let infcx = &tcx.infer_ctxt().build();
let cause = ObligationCause::dummy();
let ocx = ObligationCtxt::new(infcx);