diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-03-31 04:38:43 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-03-31 09:51:35 -0400 |
| commit | cdb10b884b3975dd897096e052f386f55cf0f4c9 (patch) | |
| tree | a75858430889306bd509cdb801be0df19c742c6f /src/rustllvm/RustWrapper.cpp | |
| parent | cead47ca53a2c6bb0f774264131dccbc0936d90b (diff) | |
| download | rust-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/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
