Fix clippy::needless_borrow in the compiler

`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`.

Then I had to remove a few unnecessary parens and muts that were exposed
now.
This commit is contained in:
Nilstrieb
2023-11-21 20:07:32 +01:00
parent 0ff8610964
commit 21a870515b
304 changed files with 1101 additions and 1174 deletions

View File

@@ -108,7 +108,7 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
param_env: ty::ParamEnv<'tcx>,
value: T,
) -> T {
let infer_ok = self.infcx.at(&cause, param_env).normalize(value);
let infer_ok = self.infcx.at(cause, param_env).normalize(value);
self.register_infer_ok_obligations(infer_ok)
}
@@ -204,7 +204,7 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
generic_param_scope: LocalDefId,
outlives_env: &OutlivesEnvironment<'tcx>,
) -> Result<(), ErrorGuaranteed> {
let errors = self.infcx.resolve_regions(&outlives_env);
let errors = self.infcx.resolve_regions(outlives_env);
if errors.is_empty() {
Ok(())
} else {