]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/generic-impl.rs
Merge commit '533f0fc81ab9ba097779fcd27c8f9ea12261fef5' into psimd
[rust.git] / src / test / rustdoc / generic-impl.rs
1 #![crate_name = "foo"]
2
3 use std::fmt;
4
5 // @!has foo/struct.Bar.html '//div[@id="impl-ToString"]//h3[@class="code-header in-band"]' 'impl<T> ToString for T'
6 pub struct Bar;
7
8 // @has foo/struct.Foo.html '//div[@id="impl-ToString"]//h3[@class="code-header in-band"]' 'impl<T> ToString for T'
9 pub struct Foo;
10 // @has foo/struct.Foo.html '//div[@class="sidebar-links"]/a[@href="#impl-ToString"]' 'ToString'
11
12 impl fmt::Display for Foo {
13     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
14         write!(f, "Foo")
15     }
16 }