Category "lifetime"

Lifetime sub-typing and impl-trait

I bumped into an interesting form of lifetime sub-typing, which I think is valid, but the compiler is skeptical of. Consider the following function, which compu

Lifetime in impl does not match method in trait

Code Playground (Stable Rust 1.45.0, 2018 edition) No external crates needed for example. type Error = Box<dyn std::error::Error>; type Result<R=()>