]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/default-trait-method-link.rs
Auto merge of #49390 - Zoxc:sync-syntax, r=michaelwoerister
[rust.git] / src / test / rustdoc / default-trait-method-link.rs
1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 #![crate_name = "foo"]
12
13 // @has foo/trait.Foo.html '//a[@href="../foo/trait.Foo.html#tymethod.req"]' 'req'
14 // @has foo/trait.Foo.html '//a[@href="../foo/trait.Foo.html#method.prov"]' 'prov'
15
16 /// Always make sure to implement [`req`], but you don't have to implement [`prov`].
17 ///
18 /// [`req`]: Foo::req
19 /// [`prov`]: Foo::prov
20 pub trait Foo {
21     /// Required
22     fn req();
23     /// Provided
24     fn prov() {}
25 }