]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/typedef.rs
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / rustdoc / typedef.rs
1 pub trait MyTrait {
2     fn method_on_mytrait() {}
3 }
4
5 pub struct MyStruct;
6
7 impl MyStruct {
8     pub fn method_on_mystruct() {}
9 }
10
11 // @has typedef/type.MyAlias.html
12 // @has - '//*[@class="impl"]//h3[@class="code-header"]' 'impl MyAlias'
13 // @has - '//*[@class="impl"]//h3[@class="code-header"]' 'impl MyTrait for MyAlias'
14 // @hasraw - 'Alias docstring'
15 // @has - '//*[@class="sidebar"]//*[@class="location"]' 'MyAlias'
16 // @has - '//*[@class="sidebar"]//a[@href="#implementations"]' 'Methods'
17 // @has - '//*[@class="sidebar"]//a[@href="#trait-implementations"]' 'Trait Implementations'
18 /// Alias docstring
19 pub type MyAlias = MyStruct;
20
21 impl MyAlias {
22     pub fn method_on_myalias() {}
23 }
24
25 impl MyTrait for MyAlias {}