-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Higher-order argument modes generate contradictory compile errors #2721
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
Comments
This problem will hopefully go away when argument modes go away, which is hopefully soon. |
hopefully! in the meantime i will also note that it appears to simply have it backwards. changing the fn(str) to fn(-str) produces: error: mismatched types: expected |
Yeah, those "backwards" errors are endemic in typeck -- keep reporting them. |
(marking as "postponed" since we can probably close this when argument modes go away) |
Is there a "remove argument mode" issue to link this issue to? Also #2585 is waiting for this. |
The fix is to modify infer to track which value comes "from the user" and which does not. |
I think I opened an issue for this... I'll search and open one if not. Or maybe just fix it. It's just some tedious work. |
closing as a dup of #2806. |
Allow configurable and platform-specific page sizes This fixes rust-lang#2644 by setting platform-default page sizes along with a command line flag to override size to a specific value (e.g. in the case of aarch64 Linux on M1 silicon). There's still some code cleanup to be done and tests need to be added but I'm opening this for now.
Allow configurable and platform-specific page sizes This fixes rust-lang#2644 by setting platform-default page sizes along with a command line flag to override size to a specific value (e.g. in the case of aarch64 Linux on M1 silicon). There's still some code cleanup to be done and tests need to be added but I'm opening this for now.
error: mismatched types: expected
fn@(&&<V1>)
but foundnative fn(str)
(expected argument mode ++ but found &&)This arose when passing a fn(str) as an argument to a function expecting fn@(T). No explicit argument mode annotation was used.
note the contradiction: "expected ..&&.." at first followed by "expected ..++.." later. Patrick seems to think they must be referring to the same thing (the argument of the function being passed) because it wouldn't come up without higher-order arguments.
The text was updated successfully, but these errors were encountered: