1
Fork 0

Rollup merge of #127474 - tesuji:foldable-inline-derefs, r=t-rustdoc

doc: Make block of inline Deref methods foldable

After:
![image](3e8ab320-dbf7-436f-9be0-d0ef82664663)
Before:
![image](f6f7635d-d4c3-437e-a2d9-147726287b05)

Fix  #127470.

Current status:
- [x] Bug when hovering over title "Methods from ...": The anchor sign $ overlaps with `[-]`: https://github.com/rust-lang/rust/pull/127474#issuecomment-2222930038
    => Fixed by https://github.com/rust-lang/rust/pull/127474#issuecomment-2228886292
This commit is contained in:
Matthias Krüger 2024-09-02 04:19:27 +02:00 committed by GitHub
commit c90991db17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 63 additions and 4 deletions

View file

@ -356,3 +356,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
}
}