Files
rust/src/test/rustdoc/issue-29503.rs

19 lines
387 B
Rust
Raw Normal View History

2018-08-10 19:36:08 +02:00
// ignore-tidy-linelength
use std::fmt;
// @has issue_29503/trait.MyTrait.html
pub trait MyTrait {
fn my_string(&self) -> String;
}
2018-08-10 19:36:08 +02:00
// @has - "//div[@id='implementors-list']/h3[@id='impl-MyTrait']//code" "impl<T> MyTrait for T where T: Debug"
impl<T> MyTrait for T where T: fmt::Debug {
fn my_string(&self) -> String {
format!("{:?}", self)
}
}
pub fn main() {
}