Closed
Description
I'm trying to use a reference in an associated type. Rust wants me to add lifetime annotations, but it doesn't tell me where exactly they are needed.
If I try such (invalid) code:
trait Tr {
type Ty;
}
struct St;
impl<'a> Tr for St {
type Ty = &'a u8;
}
I'm getting error:
error: the lifetime parameter
'a
is not constrained by the impl trait, self type, or predicates E0207
The problem is E0207
only tells me to remove the lifetime, but I'm trying to add it, so the error explanation doesn't help me solve my problem.
Pinging #32777
rustc 1.10.0-nightly (2b79e05 2016-05-13)
Metadata
Metadata
Assignees
Labels
No labels