don't clone types that are copy

This commit is contained in:
Matthias Krüger 2023-02-15 23:18:40 +01:00
parent 2d14db321b
commit e087f61075
4 changed files with 6 additions and 7 deletions

View file

@ -599,7 +599,7 @@ fn virtual_call_violation_for_method<'tcx>(
return false;
}
contains_illegal_self_type_reference(tcx, trait_def_id, pred.clone())
contains_illegal_self_type_reference(tcx, trait_def_id, pred)
}) {
return Some(MethodViolationCode::WhereClauseReferencesSelf);
}