2023-10-16 23:12:17 +00:00
|
|
|
// https://github.com/rust-lang/rust/issues/29503
|
2023-10-16 22:41:04 +00:00
|
|
|
#![crate_name="issue_29503"]
|
|
|
|
|
2016-05-09 14:48:02 +00:00
|
|
|
use std::fmt;
|
|
|
|
|
2024-06-21 12:03:08 +00:00
|
|
|
//@ has issue_29503/trait.MyTrait.html
|
2016-05-09 14:48:02 +00:00
|
|
|
pub trait MyTrait {
|
|
|
|
fn my_string(&self) -> String;
|
|
|
|
}
|
|
|
|
|
2024-06-21 12:03:08 +00: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 06:11:36 +00:00
|
|
|
impl<T> MyTrait for T
|
|
|
|
where
|
|
|
|
T: fmt::Debug,
|
|
|
|
{
|
2016-05-09 14:48:02 +00:00
|
|
|
fn my_string(&self) -> String {
|
|
|
|
format!("{:?}", self)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-02 06:11:36 +00:00
|
|
|
pub fn main() {}
|