summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-js/search-method-disambiguate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-js/search-method-disambiguate.rs')
-rw-r--r--tests/rustdoc-js/search-method-disambiguate.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/rustdoc-js/search-method-disambiguate.rs b/tests/rustdoc-js/search-method-disambiguate.rs
new file mode 100644
index 000000000..ae884447a
--- /dev/null
+++ b/tests/rustdoc-js/search-method-disambiguate.rs
@@ -0,0 +1,22 @@
+pub trait X {
+ type InnerType;
+ fn my_method(&self) -> Self::InnerType;
+}
+
+pub struct MyTy<T> {
+ pub t: T,
+}
+
+impl X for MyTy<bool> {
+ type InnerType = bool;
+ fn my_method(&self) -> bool {
+ self.t
+ }
+}
+
+impl X for MyTy<u8> {
+ type InnerType = u8;
+ fn my_method(&self) -> u8 {
+ self.t
+ }
+}