2023-10-16 18:12:17 -05:00
|
|
|
// https://github.com/rust-lang/rust/issues/29503
|
2023-10-16 17:41:04 -05:00
|
|
|
#![crate_name="issue_29503"]
|
|
|
|
|
2016-05-09 09:48:02 -05:00
|
|
|
use std::fmt;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has issue_29503/trait.MyTrait.html
|
2016-05-09 09:48:02 -05:00
|
|
|
pub trait MyTrait {
|
|
|
|
fn my_string(&self) -> String;
|
|
|
|
}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - "//div[@id='implementors-list']//*[@id='impl-MyTrait-for-T']//h3[@class='code-header']" "impl<T> MyTrait for Twhere T: Debug"
|
2022-02-02 00:11:36 -06:00
|
|
|
impl<T> MyTrait for T
|
|
|
|
where
|
|
|
|
T: fmt::Debug,
|
|
|
|
{
|
2016-05-09 09:48:02 -05:00
|
|
|
fn my_string(&self) -> String {
|
|
|
|
format!("{:?}", self)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-02 00:11:36 -06:00
|
|
|
pub fn main() {}
|