diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-04-02 18:52:04 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-04-02 18:52:04 +0200 |
| commit | f9cc0307fec0c37941186d9588ef437268bd5c92 (patch) | |
| tree | 9a8f70fb3f25cf2601262f5746ea22b9620f7a38 /src/test/rustdoc/default-trait-method-link.rs | |
| parent | 135f334e0a3177146f7417cee7ceaf405ffe732d (diff) | |
| download | rust-f9cc0307fec0c37941186d9588ef437268bd5c92.tar.gz rust-f9cc0307fec0c37941186d9588ef437268bd5c92.zip | |
Fix url for intra link provided method
Diffstat (limited to 'src/test/rustdoc/default-trait-method-link.rs')
| -rw-r--r-- | src/test/rustdoc/default-trait-method-link.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/rustdoc/default-trait-method-link.rs b/src/test/rustdoc/default-trait-method-link.rs new file mode 100644 index 00000000000..9cde446eb94 --- /dev/null +++ b/src/test/rustdoc/default-trait-method-link.rs @@ -0,0 +1,25 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_name = "foo"] + +// @has foo/trait.Foo.html '//a[@href="../foo/trait.Foo.html#tymethod.req"]' 'req' +// @has foo/trait.Foo.html '//a[@href="../foo/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() {} +} |
