This commit is contained in:
Yuki Okushi 2020-03-03 04:37:39 +09:00
parent 0f4a3feccc
commit f1d0791c3a

View File

@ -128,7 +128,7 @@ fn verify_ty_bound<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>, source: S
db.span_label(const_kw_span, "make this a static item (maybe with lazy_static)"); db.span_label(const_kw_span, "make this a static item (maybe with lazy_static)");
}, },
Source::Assoc { ty: ty_span, .. } => { Source::Assoc { ty: ty_span, .. } => {
if ty.flags.contains(TypeFlags::HAS_FREE_LOCAL_NAMES) { if ty.flags.intersects(TypeFlags::HAS_FREE_LOCAL_NAMES) {
db.span_label(ty_span, &format!("consider requiring `{}` to be `Copy`", ty)); db.span_label(ty_span, &format!("consider requiring `{}` to be `Copy`", ty));
} }
}, },