summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/default-trait-method-link.rs
blob: 7bcd2a3c149e9a7a81d0bbc947311fc4827f39ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![crate_name = "foo"]

// @has foo/trait.Foo.html '//a[@href="trait.Foo.html#tymethod.req"]' 'req'
// @has foo/trait.Foo.html '//a[@href="trait.Foo.html#method.prov"]' 'prov'

/// Always make sure to implement [`req`], but you don't have to implement [`prov`].
///
/// [`req`]: Foo::req
/// [`prov`]: Foo::prov
pub trait Foo {
    /// Required
    fn req();
    /// Provided
    fn prov() {}
}