-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update reference to indicate stabilization of deprecated
attribute.
#34070
Update reference to indicate stabilization of deprecated
attribute.
#34070
Conversation
@@ -1983,6 +1983,7 @@ macro scope. | |||
|
|||
### Miscellaneous attributes | |||
|
|||
- `deprecated` - Allows using the `#[deprecated]` attribute. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you put this in the wrong place? I don't understand what this is saying or why it belongs in this list. It used to be that #[feature(deprecated)]
allowed use of #[deprecated]
, but it's stabilized now. Or did you mean the #[allow(deprecated)]
attribute? But that allows usage of items marked deprecated, not use of #[deprecated]
itself AFAIK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@durka, ah, I see. I just moved the existing reference to deprecated
; I missed seeing that the verbiage needed to be changed as well. As the structure of the document currently stands, this is the list of attributes which aren't specifically scoped to crates, modules, functions, items, etc.
It looks like the wording should presumably be altered to say something like this:
deprecated
- Marks the item as deprecated.
Presumably that should be expanded a bit, too; what's the actual syntax for the use of the deprecated attribute—version number and comment? I can't find that attribute itself documented anywhere. If someone can give me the relevant info, I'll fill it out with that.
(Which, of course, is exactly why we need rust-lang/rfcs#1636. 😉)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax is #[deprecated(since = "crate version", note = "...")]
, both fields optional. Documented in the RFC and the test suite but it really needs to be in the reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly.
@bors: r+ rollup Thanks Chris! |
📌 Commit 2745d3e has been approved by |
👍🏼😊 |
…ated-attribute, r=steveklabnik Update reference to indicate stabilization of `deprecated` attribute. None
No description provided.