1
Fork 0

Improve deprecation attribute diagnostic messages.

(From the PR feedback.)

Co-authored-by: Esteban Küber <esteban@kuber.com.ar>
This commit is contained in:
Mara Bos 2020-11-02 13:17:14 +01:00
parent 9fc991a0ea
commit 9c647d1021
5 changed files with 12 additions and 19 deletions

View file

@ -656,7 +656,8 @@ where
if let Some((_, span)) = &depr {
struct_span_err!(diagnostic, attr.span, E0550, "multiple deprecated attributes")
.span_note(*span, "first deprecation attribute here")
.span_label(attr.span, "repeated deprecation attribute")
.span_label(*span, "first deprecation attribute")
.emit();
break;
}