1
Fork 0

Simplify existing Diagnostic implementations

This commit is contained in:
SLASHLogin 2022-10-30 19:26:12 +01:00
parent 3728e95596
commit 9a1545861e
4 changed files with 53 additions and 50 deletions

View file

@ -396,8 +396,11 @@ pub fn from_fn_attrs<'ll, 'tcx>(
.map_or_else(|| cx.tcx.def_span(instance.def_id()), |a| a.span);
cx.tcx
.sess
.create_err(TargetFeatureDisableOrEnable { features: f, span: Some(span) })
.subdiagnostic(MissingFeatures)
.create_err(TargetFeatureDisableOrEnable {
features: f,
span: Some(span),
missing_features: Some(MissingFeatures),
})
.emit();
return;
}