diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-07-15 18:10:50 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-07-15 20:07:24 +0200 |
| commit | 9855a3844bbe96d03f18541bdee3e325c35c8a34 (patch) | |
| tree | 0f0ac9c0ef4f1626a3bc866d8fc85a42d62c123d /tests/rustdoc-gui/src | |
| parent | a868b3fce74c11e2efc54ed1e9f13894a4bc6381 (diff) | |
| download | rust-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.rs | 10 |
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 + } +} |
