-
Notifications
You must be signed in to change notification settings - Fork 13.3k
#![feature(arbitrary_self_types)]
- "type of self
must not be a method generic parameter type"
#135429
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I assume this is expected and not a bug, but it would be good to confirm that, I recommend using cargo-bisect-rustc to figure out which PR made this info an error. |
What do you mean with "info"? Previously, it didn't generate any message, no warnings or so. It was correctly compiled and worked as expected. So I'd personally see this as a regression/error. |
I meant "into" that was a typo. This is an unstable feature, so it is expected to change. I know there were some recent changes to it which have probably causes this. That's why I asked for a bisection, so we can find the PR that regressed this, which will probably tell us whether it was an accidental regression (and therefore a bug) or an expected change (not a bug). |
bisects to #130098 in |
@rustbot label +S-has-bisection -E-needs-bisection |
Thank you for the bisection. Yeah that look very intentional. You will need to change your code to remove the use of generic self types. |
Ack, thanks for the clarification. Will close the bug. |
Thanks for the explanation why the error happens. I looked at the reasoning in the relevant threads. Basically, the feature does work with generic self types w/o problems, the worries are with people using explicit generics via turbofish operator, which potentially causes strange compile errors. Would it be at least possible to allow something like Background: We have a set of handle types all implementing a |
I'd recommend opening a new issue about that topic |
Up to version 1.83 the following code compiled successfully:
Code
With version 1.84 we get the following error:
Version it worked on
It most recently worked on: 1.83
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: