diff options
Diffstat (limited to 'src/test/rustdoc/issue-72340.rs')
-rw-r--r-- | src/test/rustdoc/issue-72340.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/rustdoc/issue-72340.rs b/src/test/rustdoc/issue-72340.rs new file mode 100644 index 000000000..64044cfe9 --- /dev/null +++ b/src/test/rustdoc/issue-72340.rs @@ -0,0 +1,19 @@ +#![crate_name = "foo"] + +pub struct Body; + +impl Body { + pub fn empty() -> Self { + Body + } + +} + +impl Default for Body { + // @has foo/struct.Body.html '//a/@href' 'struct.Body.html#method.empty' + + /// Returns [`Body::empty()`](Body::empty). + fn default() -> Body { + Body::empty() + } +} |