about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-03-31 04:38:43 -0400
committerNiko Matsakis <niko@alum.mit.edu>2015-03-31 09:51:35 -0400
commitcdb10b884b3975dd897096e052f386f55cf0f4c9 (patch)
treea75858430889306bd509cdb801be0df19c742c6f /src/rustllvm/ExecutionEngineWrapper.cpp
parentcead47ca53a2c6bb0f774264131dccbc0936d90b (diff)
downloadrust-cdb10b884b3975dd897096e052f386f55cf0f4c9.tar.gz
rust-cdb10b884b3975dd897096e052f386f55cf0f4c9.zip
A very simple hack to force an autoderef if the callee has type `&mut
F`, so that if we have `x: &mut FnMut()`, then `x()` is translated to
`FnMut::call_mut(&mut *x, ())` rather than `&mut x`. The latter would
require `mut x: &mut FnMut()`, which is really a lot of mut. (Actually,
the `mut` is normally required except for the special case of a `&mut F`
reference, because that's the one case where we distinguish a unique
path like `x` from a mutable path.)
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions