Implicit lifetimes on rustdoc?

Sine RFC Infer outlives lifetime annotations like here became optional:

struct X<'a, 'b> {
    ref1: &'a (&'b i32,),
}

That confuses. Here it is not optional:

fn f<'a, 'b: 'a>() {
    let _: &X<'a, 'b>;
}

Those implicit bounds are unfortunately still very much undocumented in the generated rustdoc; so it's an implicit property of the struct, perhaps comparable to how implicit/undocumented the variance of a struct is.

rustdoc, generates implicit things, like auto-traits, so such enhancement would align with its philosophy as I see it.

In continuation of the post.

4 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.