2018-07-21 11:19:17 +00:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
|
|
|
use std::fmt;
|
|
|
|
|
2022-07-05 13:10:12 +00:00
|
|
|
// @!has foo/struct.Bar.html '//*[@id="impl-ToString-for-Bar"]' ''
|
2018-07-21 11:19:17 +00:00
|
|
|
pub struct Bar;
|
|
|
|
|
2022-09-25 20:52:26 +00:00
|
|
|
// @has foo/struct.Foo.html '//*[@id="impl-ToString-for-Foo"]//h3[@class="code-header"]' 'impl<T> ToString for T'
|
2018-07-21 11:19:17 +00:00
|
|
|
pub struct Foo;
|
2022-07-05 13:10:12 +00:00
|
|
|
// @has foo/struct.Foo.html '//*[@class="sidebar-elems"]//section//a[@href="#impl-ToString-for-Foo"]' 'ToString'
|
2018-07-21 11:19:17 +00:00
|
|
|
|
|
|
|
impl fmt::Display for Foo {
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
|
|
write!(f, "Foo")
|
|
|
|
}
|
|
|
|
}
|