Skip to content

Commit d71319c

Browse files
committed
feat(parser): extend error messages for inner_attributes rust-lang#61218
1 parent 8197085 commit d71319c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libsyntax/parse/attr.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ impl<'a> Parser<'a> {
2929
let inner_error_reason = if just_parsed_doc_comment {
3030
"an inner attribute is not permitted following an outer doc comment"
3131
} else if !attrs.is_empty() {
32+
self.diagnostic()
33+
.struct_span_note(self.prev_span, "previous outer attribute")
34+
.emit()
3235
"an inner attribute is not permitted following an outer attribute"
3336
} else {
3437
DEFAULT_UNEXPECTED_INNER_ATTR_ERR_MSG

0 commit comments

Comments
 (0)