Instead of generating `#impl`, `#impl-1`, etc., generate IDs like `#impl-Foo<M>`. Co-authored-by: Noah Lev <camelidcamel@gmail.com>
18 lines
398 B
Rust
18 lines
398 B
Rust
use std::fmt;
|
|
|
|
// @has issue_29503/trait.MyTrait.html
|
|
pub trait MyTrait {
|
|
fn my_string(&self) -> String;
|
|
}
|
|
|
|
// @has - "//div[@id='implementors-list']//*[@id='impl-MyTrait-for-T']//h3[@class='code-header in-band']" "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() {}
|