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 5856e40 commit 23c3941Copy full SHA for 23c3941
src/test/rustdoc/deref-to-primitive.rs
@@ -0,0 +1,15 @@
1
+#![crate_name = "foo"]
2
+
3
+// @has 'foo/struct.Foo.html'
4
+// @has - '//*[@id="deref-methods-i32"]' 'Methods from Deref<Target = i32>'
5
+// @has - '//*[@id="deref-methods-i32-1"]//*[@id="associatedconstant.BITS"]/h4' \
6
+// 'pub const BITS: u32 = 32u32'
7
+pub struct Foo(i32);
8
9
+impl std::ops::Deref for Foo {
10
+ type Target = i32;
11
12
+ fn deref(&self) -> &Self::Target {
13
+ &self.0
14
+ }
15
+}
0 commit comments