You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: mismatched types: expected fn@(&&<V1>) but found native 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.
Activity
catamorphism commentedon Jun 26, 2012
This problem will hopefully go away when argument modes go away, which is hopefully soon.
bblum commentedon Jun 26, 2012
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
fn@(&&uint)but foundnative fn(-<V10>)(expected argument mode - but found &&)catamorphism commentedon Jun 28, 2012
Yeah, those "backwards" errors are endemic in typeck -- keep reporting them.
catamorphism commentedon Jun 28, 2012
(marking as "postponed" since we can probably close this when argument modes go away)
kud1ing commentedon Jun 29, 2012
Is there a "remove argument mode" issue to link this issue to? Also #2585 is waiting for this.
nikomatsakis commentedon Jul 5, 2012
The fix is to modify infer to track which value comes "from the user" and which does not.
nikomatsakis commentedon Jul 5, 2012
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.
nikomatsakis commentedon Jul 5, 2012
closing as a dup of #2806.
Auto merge of rust-lang#2721 - a-b-c-1-2-3:fix-pagesize, r=RalfJung
Auto merge of rust-lang#2721 - a-b-c-1-2-3:fix-pagesize, r=RalfJung
Merge pull request rust-lang#2721 from rust-lang/rustc-pull