It's not about types or consts, but the lack of regions

This commit is contained in:
Oli Scherer
2022-10-04 09:43:34 +00:00
parent ead49f0beb
commit c7b6ebdf7c
30 changed files with 71 additions and 77 deletions

View File

@@ -57,7 +57,7 @@ pub fn can_type_implement_copy<'tcx>(
// to begin with, and point to the bad field's span instead.
let cause = if field
.ty(tcx, traits::InternalSubsts::identity_for_item(tcx, adt.did()))
.has_param_types_or_consts()
.has_non_region_param()
{
parent_cause.clone()
} else {