]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Rollup merge of #49179 - varkor:future-deprecation, r=QuietMisdreavus,GuillaumeGomez
authorkennytm <kennytm@gmail.com>
Wed, 4 Apr 2018 09:07:10 +0000 (11:07 +0200)
committerGitHub <noreply@github.com>
Wed, 4 Apr 2018 09:07:10 +0000 (11:07 +0200)
commitb7b2ae2b6f88ea29290e0b25576c4a92690c0e26
treef0b86b0d4b20c17cc0a29484d6b6d271357c4acb
parent5758c2dd14fd29caf7c7bb2123eb6b23443b9233
parentb2ed9dd546e33ded4a80acd02e1710fe811936b2
Rollup merge of #49179 - varkor:future-deprecation, r=QuietMisdreavus,GuillaumeGomez

Handle future deprecation annotations

This adds special handling to the `since` parameter of the `deprecated` attribute: in particular, if the `since` version exceeds the version of the compiler, the deprecation notice will not be printed; but a note is added to the documentation stating that the item will be deprecated in a later version.

(I've used `since` for this, rather than adding a new attribute, because it's more seamless and, I feel, intuitive. Plus it involves less code churn.)

![image](https://user-images.githubusercontent.com/3943692/37611317-ef5cdf16-2b99-11e8-8251-e35e8f7b0137.png)
![image](https://user-images.githubusercontent.com/3943692/37611323-f748c2d0-2b99-11e8-966b-11408c73d416.png)

This is a prerequisite for doing things renaming methods in the standard library (e.g. #30459). Resolves #30785.
src/librustdoc/html/render.rs