Reimplement Self
in impls in the compiler
#23909
Labels
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
Self
in impls in the compiler
#23909
Currently the
Self::
shorthand in the body of an impl is implemented by syntactic expansion in libsyntax. That leads to a bug if another item shadows the concrete type. E.g.,The
Self
on the commented line will cause an error in name resolution, sinceSelf
ends up referring to the local variableFoo
, not the self type.The text was updated successfully, but these errors were encountered: