Skip to content

Commit 196b071

Browse files
committed
Rephrase the bit about public items
1 parent d23a68c commit 196b071

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/attributes.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,9 @@ fields, `since` and `note`.
196196
- `note` is a free text field, allowing you to provide an explanation about
197197
the deprecation and preferred alternatives.
198198

199-
Public API items can be given the `#[deprecated]` attribute. This includes
200-
`fn`s, methods, trait and inherent `impl`s, `const`s, type definitions,
201-
`struct` fields, and `enum` variants. `#[deprecated]` on a module is inherited
202-
by all child items of that module.
199+
Only [public items](visibility-and-privacy.html) can be given the
200+
`#[deprecated]` attribute. `#[deprecated]` on a module is inherited by all
201+
child items of that module.
203202

204203
`rustc` will issue warnings on usage of `#[deprecated]` items. `rustdoc` will
205204
show item deprecation, including the `since` version and `note`, if available.

0 commit comments

Comments
 (0)