7312e0a163
So far, calls going through `Fn::call`, `FnMut::call_mut`, or `FnOnce::call_once` have not been translated properly into MIR: The call `f(a, b, c)` where `f: Fn(T1, T2, T3)` would end up in MIR as: ``` call `f` with arguments `a`, `b`, `c` ``` What we really want is: ``` call `Fn::call` with arguments `f`, `a`, `b`, `c` ``` This PR transforms these kinds of overloaded calls during `HIR -> HAIR` translation. What's still a bit funky is that the `Fn` traits expect arguments to be tupled but due to special handling type-checking and trans, we do not actually tuple arguments and everything still checks out fine. So, after this PR we end up with MIR containing calls where function signature and arguments seemingly don't match: ``` call Fn::call(&self, args: (T1, T2, T3)) with arguments `f`, `a`, `b`, `c` ``` instead of ``` call Fn::call(&self, args: (T1, T2, T3)) with arguments `f`, (`a`, `b`, `c`) // <- args tupled! ``` It would be nice if the call traits could go without special handling in MIR and later on. |
||
---|---|---|
.. | ||
compiler-rt@b6087e82ba | ||
compiletest | ||
doc | ||
driver | ||
error-index-generator | ||
etc | ||
grammar | ||
jemalloc@f84e309272 | ||
liballoc | ||
liballoc_jemalloc | ||
liballoc_system | ||
libarena | ||
libbacktrace | ||
libcollections | ||
libcollectionstest | ||
libcore | ||
libcoretest | ||
libflate | ||
libfmt_macros | ||
libgetopts | ||
libgraphviz | ||
liblibc@e0c0bf439a | ||
liblog | ||
librand | ||
librbml | ||
librustc | ||
librustc_back | ||
librustc_bitflags | ||
librustc_borrowck | ||
librustc_data_structures | ||
librustc_driver | ||
librustc_front | ||
librustc_lint | ||
librustc_llvm | ||
librustc_metadata | ||
librustc_mir | ||
librustc_platform_intrinsics | ||
librustc_plugin | ||
librustc_privacy | ||
librustc_resolve | ||
librustc_trans | ||
librustc_typeck | ||
librustc_unicode | ||
librustdoc | ||
libserialize | ||
libstd | ||
libsyntax | ||
libsyntax_ext | ||
libterm | ||
libtest | ||
llvm@3564439515 | ||
rt | ||
rtstartup | ||
rust-installer@c37d3747da | ||
rustbook | ||
rustllvm | ||
test | ||
snapshots.txt |