rust/tests/rustdoc/generic-impl.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
483 B
Rust
Raw Normal View History

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