2022-01-11 16:20:01 -06:00
|
|
|
#![deny(rustdoc::broken_intra_doc_links)]
|
|
|
|
|
|
|
|
// Test intra-doc links on trait implementations with generics
|
2022-01-13 02:10:08 -06:00
|
|
|
// regression test for issue #92662
|
2022-01-11 16:20:01 -06:00
|
|
|
|
|
|
|
use std::marker::PhantomData;
|
|
|
|
|
|
|
|
pub trait Bar<T> {
|
|
|
|
fn bar(&self);
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Foo<U>(PhantomData<U>);
|
|
|
|
|
|
|
|
impl<T, U> Bar<T> for Foo<U> {
|
|
|
|
fn bar(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
// @has generic_trait_impl/fn.main.html '//a[@href="struct.Foo.html#method.bar"]' 'Foo::bar'
|
|
|
|
/// link to [`Foo::bar`]
|
|
|
|
pub fn main() {}
|