summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/intra-doc/generic-trait-impl.rs
blob: ba8595abfa9590b094cf442a721baf569b3b2e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![deny(rustdoc::broken_intra_doc_links)]

// Test intra-doc links on trait implementations with generics
// regression test for issue #92662

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() {}