E0308 because Self
is not equivalent to concrete type in constructor (lifetime mismatch)
#70265
Labels
C-bug
Category: This is a bug.
I tried this code:
I expect this code to compile without error because I would assume that
Self
is equivalent toS
in this case. I expect this equivalence becauseSelf
is used as an alias ofS
in the body of a function andlifetimes cannot be annotated in function bodies(edit: this turns out to be incorrect, see below).Instead, this happened:
Meta
rustc --version --verbose
:Same behaviour with the nightly version of Rust:
Probably related to: #69224
The text was updated successfully, but these errors were encountered: