I have this sample code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c1f51dba8441a2f6e9ed1982769e8e0f
Which doesn't compile:
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> src/main.rs:24:24
|
24 | pub fn e(&self) -> MyEndpoint<impl Registrar + '_> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: hidden type `std::sync::MutexGuard<'_, MyRegistrar<'a>>` captures the lifetime `'a` as defined on the impl at 23:6
--> src/main.rs:23:6
|
23 | impl<'a> EndpointState<'a> {
| ^^
I don't have a clue on what's the compiler is trying to tell me :-/
I feel like lifetime is the next big step to climb for me… simple cases are easy enough, but sometime, weirder cases like these bite me ^^'