Trait fix_hidden_lifetime_bug::MentionsTy[][src]

pub trait MentionsTy<__: ?Sized> { }
Expand description

Same as Captures, but taking a type parameter instead.

It can be a lazy / convenient way to avoid having to think about lifetimes too much, by using instead:

  -> impl 'lt + Trait + MentionsTy<Arg1> + MentionsTy<Arg2> + etc

For instance,

fn baz<'a, 'b> (whatever: &'a mut &'b ())
  -> impl 'a + Sized //   ↕↕↕↕↕↕↕↕↕↕↕↕↕↕
             + MentionsTy<&'a mut &'b ()>
{
    stuff(whatever)
}

Implementors