@centril just wanted to confirm that you aren't working on this?
@davidtwco I gave it a look at decided it was becoming too complicated at the time
but we can talk if you want about it
not working on it tho
(https://github.com/rust-lang/rust/pull/64910 should land first)
I threw something together locally if you don't mind me working on it.
oh, already? interesting
r? me if you want
Are you just making changes in
that was quick :D -- will have a look later tonight
from the outset it seems a much cleaner approach than the throw-away stuff I had
@davidtwco looking at
self: i32... did you consider a more semantic approach with
.parse_ty() and then checking whether the type would be applicable as a
self: SelfTy parameter?
I thought about it, but wasn't sure that it made sense for the parser to do that - would just have added a lot of complexity.
I made the suggestion
MaybeIncorrect for cases like that.
it's OK in the parser in recovery branches if it is reasonably hidden away from main happy-path logic but I think you're right that even so it would be a lot of complexity (you'd need a visitor and such)
I don't know if it's required for the arbitrary self type to contain
Self - could there be some trait implementation on
i32 that takes a
self: i32 correctly?
The stable subset requires
&mut Self and some stuff about
Self need not syntactically occur
it could be a type alias to the type, iirc
but as a heuristic it works
Sure. It's an improvement we could do in a follow-up if we really wanted, I think this is a reasonable improvement to land first.
One could do something dumber tho: Use a visitor that looks for
kw::SelfUpper as the identifier
@davidtwco yeah agreed on that