Skip to content

Commit 1d352dc

Browse files
authored
Merge pull request #813 from ehuss/update-deprecated-macro
Update that macros can be deprecated.
2 parents 7a60492 + 2196589 commit 1d352dc

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/attributes/diagnostics.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,13 @@ The `deprecated` attribute has several forms:
124124
deprecation and preferred alternatives.
125125

126126
The `deprecated` attribute may be applied to any [item], [trait item], [enum
127-
variant], [struct field], or [external block item]. It cannot be applied to [trait
128-
implementation items]. When applied to an item containing other items, such as
129-
a [module] or [implementation], all child items inherit the deprecation attribute.
130-
<!-- NOTE: Currently broken for macros, see https://github.com/rust-lang/rust/issues/49912
131-
Also, it is only rejected for trait impl items (AnnotationKind::Prohibited). In all
132-
other locations, it is silently ignored. Tuple struct fields are ignored.
127+
variant], [struct field], [external block item], or [macro definition]. It
128+
cannot be applied to [trait implementation items]. When applied to an item
129+
containing other items, such as a [module] or [implementation], all child
130+
items inherit the deprecation attribute.
131+
<!-- NOTE: It is only rejected for trait impl items
132+
(AnnotationKind::Prohibited). In all other locations, it is silently ignored.
133+
Tuple struct fields are ignored.
133134
-->
134135

135136
Here is an example:
@@ -270,6 +271,7 @@ When used on a function in a trait implementation, the attribute does nothing.
270271
[implementation]: ../items/implementations.md
271272
[item]: ../items.md
272273
[let statement]: ../statements.md#let-statements
274+
[macro definition]: ../macros-by-example.md
273275
[module]: ../items/modules.md
274276
[rustc book]: ../../rustc/lints/index.html
275277
[struct field]: ../items/structs.md

0 commit comments

Comments
 (0)