1
Fork 0

Make ObligationCtxt::normalize take cause by borrow

This commit is contained in:
Michael Goulet 2022-11-25 18:40:52 +00:00
parent ce409b5200
commit 1e236acd05
11 changed files with 27 additions and 29 deletions

View file

@ -104,8 +104,7 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
pub fn normalize<T: TypeFoldable<'tcx>>(
&self,
// FIXME(compiler-errors): Make this borrow
cause: ObligationCause<'tcx>,
cause: &ObligationCause<'tcx>,
param_env: ty::ParamEnv<'tcx>,
value: T,
) -> T {
@ -186,7 +185,7 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
// sound and then uncomment this line again.
// implied_bounds.insert(ty);
let normalized = self.normalize(cause.clone(), param_env, ty);
let normalized = self.normalize(&cause, param_env, ty);
implied_bounds.insert(normalized);
}
implied_bounds