rust/tests/rustdoc/default-trait-method-link.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
395 B
Rust
Raw Normal View History

2018-04-03 00:52:04 +08:00
#![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'
2018-04-03 00:52:04 +08:00
/// 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() {}
}