]>
Commit | Line | Data |
---|---|---|
9346a6ac | 1 | // aux-build:rustdoc-extern-default-method.rs |
d9579d0f | 2 | // ignore-cross-compile |
04454e1e | 3 | // ignore-tidy-linelength |
85aaf69f | 4 | |
9346a6ac AL |
5 | extern crate rustdoc_extern_default_method as ext; |
6 | ||
04454e1e FG |
7 | // For this test, the dependency is compiled but not documented. |
8 | // | |
9 | // Still, the struct from the external crate and its impl should be documented since | |
10 | // the struct is re-exported from this crate. | |
11 | // However, the method in the trait impl should *not* have a link (an `href` attribute) to | |
12 | // its corresponding item in the trait declaration since it would otherwise be broken. | |
13 | // | |
487cf647 | 14 | // In older versions of rustdoc, the impl item (`a[@class="fn"]`) used to link to |
04454e1e FG |
15 | // `#method.provided` – i.e. "to itself". Put in quotes since that was actually incorrect in |
16 | // general: If the type `Struct` also had an inherent method called `provided`, the impl item | |
17 | // would link to that one even though those two methods are distinct items! | |
18 | ||
9346a6ac | 19 | // @count extern_default_method/struct.Struct.html '//*[@id="method.provided"]' 1 |
487cf647 FG |
20 | // @count extern_default_method/struct.Struct.html '//*[@id="method.provided"]//a[@class="fn"]' 1 |
21 | // @snapshot no_href_on_anchor - '//*[@id="method.provided"]//a[@class="fn"]' | |
5099ac24 | 22 | // @has extern_default_method/struct.Struct.html '//*[@id="method.provided"]//a[@class="anchor"]/@href' #method.provided |
c34b1796 | 23 | pub use ext::Struct; |