]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/issue-20727-3.rs
rustdoc: Improve handling inlined associated types
[rust.git] / src / test / rustdoc / issue-20727-3.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // aux-build:issue-20727.rs
12
13 extern crate issue_20727;
14
15 pub trait Bar {}
16
17 // @has issue_20727_3/trait.Deref2.html
18 pub trait Deref2 {
19     // @has - '//*[@class="rust trait"]' 'trait Deref2 {'
20     // @has - '//*[@class="rust trait"]' 'type Target: Bar;'
21     type Target: Bar;
22
23     // @has - '//*[@class="rust trait"]' 'fn deref(&self) -> Self::Target;'
24     fn deref(&self) -> Self::Target;
25 }
26
27 // @has issue_20727_3/reexport/trait.Deref2.html
28 pub mod reexport {
29     // @has - '//*[@class="rust trait"]' 'trait Deref2 {'
30     // @has - '//*[@class="rust trait"]' 'type Target: Bar;'
31     // @has - '//*[@class="rust trait"]' 'fn deref(&self) -> Self::Target;'
32     pub use issue_20727::Deref2;
33 }