]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/issue-29503.rs
Rollup merge of #69792 - LenaWil:try_reserve_error/impl-error, r=sfackler
[rust.git] / src / test / rustdoc / issue-29503.rs
1 // ignore-tidy-linelength
2
3 use std::fmt;
4
5 // @has issue_29503/trait.MyTrait.html
6 pub trait MyTrait {
7     fn my_string(&self) -> String;
8 }
9
10 // @has - "//div[@id='implementors-list']/h3[@id='impl-MyTrait']//code" "impl<T> MyTrait for T where T: Debug"
11 impl<T> MyTrait for T where T: fmt::Debug {
12     fn my_string(&self) -> String {
13         format!("{:?}", self)
14     }
15 }
16
17 pub fn main() {
18 }