We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 617aad8 commit 23dcf45Copy full SHA for 23dcf45
tests/rustdoc/deref/deref-methods-24686-target.rs
@@ -0,0 +1,23 @@
1
+//@ known-bug
2
+#![crate_name = "foo"]
3
+
4
+// test for https://github.com/rust-lang/rust/issues/24686
5
+use std::ops::Deref;
6
7
+pub struct Foo<T>(T);
8
+impl Foo<i32> {
9
+ pub fn get_i32(&self) -> i32 { self.0 }
10
+}
11
+impl Foo<u32> {
12
+ pub fn get_u32(&self) -> u32 { self.0 }
13
14
+//@ has foo/struct.Bar.html
15
+//@ has - '//a[@href="#method.get_i32"]' 'get_i32'
16
+//@ !has - '//a[@href="#method.get_u32"]' 'get_u32'
17
+pub struct Bar(Foo<i32>);
18
+impl Deref for Bar {
19
+ type Target = Foo<i32>;
20
+ fn deref(&self) -> &Foo<i32> {
21
+ &self.0
22
+ }
23
0 commit comments