We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a26d23 commit 391ae7fCopy full SHA for 391ae7f
src/librustdoc/clean/mod.rs
@@ -795,7 +795,17 @@ impl Clean<Lifetime> for hir::Lifetime {
795
796
impl Clean<Lifetime> for hir::LifetimeDef {
797
fn clean(&self, _: &DocContext) -> Lifetime {
798
- Lifetime(self.lifetime.name.to_string())
+ if self.bounds.len() > 0 {
799
+ let mut s = format!("{}: {}",
800
+ self.lifetime.name.to_string(),
801
+ self.bounds[0].name.to_string());
802
+ for bound in self.bounds.iter().skip(1) {
803
+ s.push_str(&format!(" + {}", bound.name.to_string()));
804
+ }
805
+ Lifetime(s)
806
+ } else {
807
+ Lifetime(self.lifetime.name.to_string())
808
809
}
810
811
0 commit comments