about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-06-19 14:29:16 +0200
committerGitHub <noreply@github.com>2020-06-19 14:29:16 +0200
commit70622db43d5e0a58f8fe66ff15115e4fcbb5c274 (patch)
tree296530d1184b80e0d2993762a1f71489848c5f39 /src/rustllvm/RustWrapper.cpp
parent63b441aafbf52d6ba789ecc478455800c1a48df9 (diff)
parent2b7d8588668bc79a1855a2c335572a1ac8ceaf34 (diff)
downloadrust-70622db43d5e0a58f8fe66ff15115e4fcbb5c274.tar.gz
rust-70622db43d5e0a58f8fe66ff15115e4fcbb5c274.zip
Rollup merge of #72280 - nbdd0121:typeck, r=nikomatsakis
Fix up autoderef when reborrowing

Currently `(f)()` and `f.call_mut()` behaves differently if expression `f` contains autoderef in it. This causes a weird error in #72225.

When `f` is type checked, `Deref` is used (this is expected as we can't yet determine if we should use `Fn` or `FnMut`). When subsequently we determine the actual trait to be used, when using the `f.call_mut()` syntax the `Deref` is patched to `DerefMut`, while for the `(f)()` syntax case it is not.

This PR replicates the fixup for the first case.

Fixes #72225
Fixes #68590
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions