debug!("visit_implementation_of_copy: self_type={:?} (free)", self_type);
- match can_type_implement_copy(tcx, param_env, self_type) {
+ let cause = traits::ObligationCause::misc(span, impl_hir_id);
+ match can_type_implement_copy(tcx, param_env, self_type, cause) {
Ok(()) => {}
Err(CopyImplementationError::InfrigingFields(fields)) => {
let item = tcx.hir().expect_item(impl_did);