rust/src
bors 7312e0a163 Auto merge of #30692 - michaelwoerister:mir-overloaded-fn-calls, r=nikomatsakis
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.
2016-01-06 09:00:57 +00:00
..
compiler-rt@b6087e82ba
compiletest
doc Auto merge of #30595 - steveklabnik:remove_learn_rust, r=gankro 2016-01-05 03:32:12 +00:00
driver
error-index-generator
etc
grammar
jemalloc@f84e309272
liballoc Auto merge of #30593 - steveklabnik:small_rc_refactoring, r=Gankro 2015-12-31 11:42:16 +00:00
liballoc_jemalloc
liballoc_system
libarena
libbacktrace
libcollections Fix off-by-one in String::remove 2016-01-02 22:36:50 +01:00
libcollectionstest
libcore Auto merge of #30702 - tshepang:derives-not-needed, r=steveklabnik 2016-01-05 10:24:37 +00:00
libcoretest Make float parsing "." return Err 2016-01-04 18:23:33 +00:00
libflate
libfmt_macros
libgetopts
libgraphviz
liblibc@e0c0bf439a
liblog
librand In the middle of the implementation 2016-01-01 04:28:26 -08:00
librbml
librustc Auto merge of #30492 - wesleywiser:fix_extra_drops, r=pnkfelix 2016-01-06 01:55:45 +00:00
librustc_back
librustc_bitflags
librustc_borrowck
librustc_data_structures
librustc_driver
librustc_front
librustc_lint
librustc_llvm
librustc_metadata Auto merge of #30264 - GuillaumeGomez:patch-5, r=Manishearth 2016-01-02 16:56:15 +00:00
librustc_mir Auto merge of #30692 - michaelwoerister:mir-overloaded-fn-calls, r=nikomatsakis 2016-01-06 09:00:57 +00:00
librustc_platform_intrinsics
librustc_plugin
librustc_privacy
librustc_resolve
librustc_trans Auto merge of #30692 - michaelwoerister:mir-overloaded-fn-calls, r=nikomatsakis 2016-01-06 09:00:57 +00:00
librustc_typeck
librustc_unicode
librustdoc Rustdoc - Specify max-image size 2016-01-02 21:38:36 -05:00
libserialize
libstd Auto merge of #29732 - nathansizemore:master, r=steveklabnik 2016-01-04 00:27:40 +00:00
libsyntax Add test for "malformed macro lhs" and change back span_bug to span_fatal 2016-01-04 01:13:57 +01:00
libsyntax_ext
libterm
libtest
llvm@3564439515
rt
rtstartup
rust-installer@c37d3747da
rustbook
rustllvm
test [MIR] Add test case for translation of closure calls. 2016-01-05 12:50:54 -05:00
snapshots.txt