We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d89bf91 commit 4fb29f9Copy full SHA for 4fb29f9
src/test/rustdoc/deref-mut-methods.rs
@@ -0,0 +1,29 @@
1
+#![crate_name = "foo"]
2
+
3
+use std::ops;
4
5
+pub struct Foo;
6
7
+impl Foo {
8
+ pub fn foo(&mut self) {}
9
+}
10
11
+// @has foo/struct.Bar.html
12
+// @has - '//div[@class="sidebar-links"]/a[@href="#method.foo"]' 'foo'
13
+pub struct Bar {
14
+ foo: Foo,
15
16
17
+impl ops::Deref for Bar {
18
+ type Target = Foo;
19
20
+ fn deref(&self) -> &Foo {
21
+ &self.foo
22
+ }
23
24
25
+impl ops::DerefMut for Bar {
26
+ fn deref_mut(&mut self) -> &mut Foo {
27
+ &mut self.foo
28
29
0 commit comments