]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/generic-impl.rs
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / rustdoc / generic-impl.rs
1 #![crate_name = "foo"]
2
3 use std::fmt;
4
5 // @!has foo/struct.Bar.html '//*[@id="impl-ToString-for-Bar"]' ''
6 pub struct Bar;
7
8 // @has foo/struct.Foo.html '//*[@id="impl-ToString-for-Foo"]//h3[@class="code-header"]' 'impl<T> ToString for T'
9 pub struct Foo;
10 // @has foo/struct.Foo.html '//*[@class="sidebar-elems"]//section//a[@href="#impl-ToString-for-Foo"]' 'ToString'
11
12 impl fmt::Display for Foo {
13     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
14         write!(f, "Foo")
15     }
16 }