diff options
| author | Michael Howell <michael@notriddle.com> | 2023-10-06 23:31:16 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-10-22 16:51:32 -0700 |
| commit | 46fdeb24fd16156f73d95272b48604ab967c81db (patch) | |
| tree | 1c572f3b512d0a2dac7be093c567c695c4430558 /tests/rustdoc-gui/src/test_docs/lib.rs | |
| parent | 62c67a6438aac23f7c757322be880ca45f2b6b63 (diff) | |
| download | rust-46fdeb24fd16156f73d95272b48604ab967c81db.tar.gz rust-46fdeb24fd16156f73d95272b48604ab967c81db.zip | |
rustdoc: make JS trait impls act more like HTML
Diffstat (limited to 'tests/rustdoc-gui/src/test_docs/lib.rs')
| -rw-r--r-- | tests/rustdoc-gui/src/test_docs/lib.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/src/test_docs/lib.rs b/tests/rustdoc-gui/src/test_docs/lib.rs index 5b6d5435b35..138a1b302fd 100644 --- a/tests/rustdoc-gui/src/test_docs/lib.rs +++ b/tests/rustdoc-gui/src/test_docs/lib.rs @@ -167,6 +167,26 @@ impl SomeOtherTypeWithMethodsAndInlining { pub fn some_other_method_directly(&self) {} } +/// Another type alias, this time with methods. +pub struct UnderlyingFooBarBaz; +pub type SomeOtherTypeWithMethodsAndInliningAndTraits = UnderlyingFooBarBaz; + +impl AsRef<str> for UnderlyingFooBarBaz { + fn as_ref(&self) -> &str { + "hello" + } +} + +impl UnderlyingFooBarBaz { + pub fn inherent_fn(&self) {} +} + +impl AsRef<u8> for SomeOtherTypeWithMethodsAndInliningAndTraits { + fn as_ref(&self) -> &u8 { + b"hello" + } +} + pub mod huge_amount_of_consts { include!(concat!(env!("OUT_DIR"), "/huge_amount_of_consts.rs")); } |
