]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Rollup merge of #78678 - Nemo157:doc-cfg-w-traits, r=jyn514,GuillaumeGomez
authorMara Bos <m-ou.se@m-ou.se>
Mon, 16 Nov 2020 16:26:25 +0000 (17:26 +0100)
committerGitHub <noreply@github.com>
Mon, 16 Nov 2020 16:26:25 +0000 (17:26 +0100)
commit7a1bd805fa50d1fd3f7a4459038819b748424ab9
tree269ab42e5f0b4ae66def66232889bc0d85cb5b03
parentc75f21008de0679d15ee412043dacd14cee0cdb4
parentc34350ab4f8a9480dc5fa89d637e61ab7acd5280
Rollup merge of #78678 - Nemo157:doc-cfg-w-traits, r=jyn514,GuillaumeGomez

Add tests and improve rendering of cfgs on traits

Shows the additional features required to get the trait implementation, suppressing any already shown on the current page. One interesting effect from this is if you have a cfg-ed type, implementing a cfg-ed trait (so the implementation depends on both cfgs), you will get the inverted pair of cfgs shown on each page:

![image](https://user-images.githubusercontent.com/81079/97904671-207bdc00-1d41-11eb-8144-707e8017d2b6.png)

![image](https://user-images.githubusercontent.com/81079/97904700-27a2ea00-1d41-11eb-8b9f-e925ba339044.png)

The hidden items on the trait implementation also now get the correct cfgs displayed on them.

Tests are blocked on #78673.

fixes #68100
cc #43781
src/librustdoc/html/render/mod.rs