Error code E0803
A trait implementation returns a reference without an
explicit lifetime linking it to self
.
It commonly arises in generic trait implementations
requiring explicit lifetime bounds.
Erroneous code example:
ⓘ
The trait method returns &f64 requiring an independent lifetime The struct Container<'a> carries lifetime parameter 'a The compiler cannot verify if the returned reference satisfies 'a constraints Solution Explicitly bind lifetimes to clarify constraints: