summary refs log tree commit diff
path: root/tests/rustdoc-gui/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-07-15 18:10:50 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-07-15 20:07:24 +0200
commit9855a3844bbe96d03f18541bdee3e325c35c8a34 (patch)
tree0f0ac9c0ef4f1626a3bc866d8fc85a42d62c123d /tests/rustdoc-gui/src
parenta868b3fce74c11e2efc54ed1e9f13894a4bc6381 (diff)
downloadrust-9855a3844bbe96d03f18541bdee3e325c35c8a34.tar.gz
rust-9855a3844bbe96d03f18541bdee3e325c35c8a34.zip
Add tests for new toggle on deref blocks
Diffstat (limited to 'tests/rustdoc-gui/src')
-rw-r--r--tests/rustdoc-gui/src/lib2/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/src/lib2/lib.rs b/tests/rustdoc-gui/src/lib2/lib.rs
index b467b044052..fafb8f3b59b 100644
--- a/tests/rustdoc-gui/src/lib2/lib.rs
+++ b/tests/rustdoc-gui/src/lib2/lib.rs
@@ -355,3 +355,13 @@ pub mod scroll_traits {
         fn this_is_a_method_with_a_long_name_returning_something() -> String;
     }
 }
+
+pub struct Derefer(String);
+
+impl std::ops::Deref for Derefer {
+    type Target = str;
+
+    fn deref(&self) -> &Self::Target {
+        &self.0
+    }
+}