1
Fork 0

rustdoc: make JS trait impls act more like HTML

This commit is contained in:
Michael Howell 2023-10-06 23:31:16 -07:00
parent 62c67a6438
commit 46fdeb24fd
6 changed files with 100 additions and 8 deletions

View file

@ -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"));
}