about summary refs log tree commit diff
path: root/src/test/rustdoc/issue-32890.rs
diff options
context:
space:
mode:
authorNick Platt <platt.nicholas@gmail.com>2016-04-16 11:46:52 -0400
committerNick Platt <platt.nicholas@gmail.com>2016-04-17 21:41:55 -0400
commit894caf83648bb0a5e43e7aeb30f806b2fb9099a5 (patch)
tree29892a77bf957f6c4d8ad217f34cde25e0299d2c /src/test/rustdoc/issue-32890.rs
parented7c56796ef17f13227a50dc1a72a018b1d5e33f (diff)
downloadrust-894caf83648bb0a5e43e7aeb30f806b2fb9099a5.tar.gz
rust-894caf83648bb0a5e43e7aeb30f806b2fb9099a5.zip
rustdoc: Disambiguate anchors for assoc item impls
Diffstat (limited to 'src/test/rustdoc/issue-32890.rs')
-rw-r--r--src/test/rustdoc/issue-32890.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/rustdoc/issue-32890.rs b/src/test/rustdoc/issue-32890.rs
new file mode 100644
index 00000000000..ef62f12d55e
--- /dev/null
+++ b/src/test/rustdoc/issue-32890.rs
@@ -0,0 +1,27 @@
+// Copyright 2016 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.
+
+// @has issue_32890/struct.Foo.html
+pub struct Foo<T>(T);
+
+impl Foo<u8> {
+    // @has - '//a[@href="#method.pass"]' 'pass'
+    pub fn pass() {}
+}
+
+impl Foo<u16> {
+    // @has - '//a[@href="#method.pass-1"]' 'pass'
+    pub fn pass() {}
+}
+
+impl Foo<u32> {
+    // @has - '//a[@href="#method.pass-2"]' 'pass'
+    pub fn pass() {}
+}