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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user