#![feature(doc_notable_trait)] pub struct Wrapper { inner: T, } impl SomeTrait for Wrapper {} #[doc(notable_trait)] pub trait SomeTrait { // @has doc_notable_trait/trait.SomeTrait.html // @has - '//code[@class="content"]' 'impl SomeTrait for Wrapper' fn wrap_me(self) -> Wrapper where Self: Sized { Wrapper { inner: self, } } } pub struct SomeStruct; impl SomeTrait for SomeStruct {} impl SomeStruct { // @has doc_notable_trait/struct.SomeStruct.html // @has - '//code[@class="content"]' 'impl SomeTrait for SomeStruct' // @has - '//code[@class="content"]' 'impl SomeTrait for Wrapper' pub fn new() -> SomeStruct { SomeStruct } } // @has doc_notable_trait/fn.bare_fn.html // @has - '//code[@class="content"]' 'impl SomeTrait for SomeStruct' pub fn bare_fn() -> SomeStruct { SomeStruct }