-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule around non-dispatchable functions doesn't match the compiler behavior #1247
Comments
|
Sounds like the reference should remove "receiver type of |
Okay, looking into this way too long, I think I understand what the original author meant by the parenthetical. Specifically, having a bound of I don't like parentheticals at all and would rather it be a note using the note notation explaining it similarly to how I just wrote it. Though not exactly; the word "implied" should not be used at all since it is confusing as evidence by this issue. We also have a policy of discussing Rust as it currently exists. We don't talk about unstable features. So any fix for this issue should not mention them. |
However, this is not true. As the example shows, |
Oh, yeah. I tried |
In the Object Safety section, it says:
This implies that if you have any associated function with receiver of
self
should be counted as non-dispatchable function. However, it is not the case. See the following code:Uncommenting
b
orc
would make the code fail to compile, unless explicitwhere Self: Sized
is added, but the rule in the reference indicates that having a receiverself
already implies that bound exists.Not sure whether it's something that should be fixed in the reference or the compiler.
The text was updated successfully, but these errors were encountered: