]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/generic-impl.rs
Auto merge of #79608 - alessandrod:bpf, r=nagisa
[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"]//code' 'impl<T> ToString for T'
6 pub struct Bar;
7
8 // @has foo/struct.Foo.html '//div[@id="impl-ToString"]//code' '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 }