From: Matthias Krüger Date: Tue, 26 Jul 2022 14:57:46 +0000 (+0200) Subject: Rollup merge of #99235 - WaffleLapkin:rustdoc_implement_support_for_must_implement... X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=811b4b890ab2b9577abdd22e3f7e9957696bfd9e;p=rust.git Rollup merge of #99235 - WaffleLapkin:rustdoc_implement_support_for_must_implement, r=GuillaumeGomez rustdoc: Add support for `#[rustc_must_implement_one_of]` This PR adds support for `#[rustc_must_implement_one_of]` attribute added in #92164. There is a desire to eventually use this attribute of `Read`, so making it show up in docs is a good thing. I "stole" the styling from cfg notes, not sure what would be a proper styling. Currently it looks like this: ![2022-07-14_15-00](https://user-images.githubusercontent.com/38225716/178968170-913c1dd5-8875-4a95-9848-b075a0bb8998.png)
Code to reproduce

```rust #![feature(rustc_attrs)] #[rustc_must_implement_one_of(a, b)] pub trait Trait { fn req(); fn a(){ Self::b() } fn b(){ Self::a() } } ```

--- 811b4b890ab2b9577abdd22e3f7e9957696bfd9e