about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-06-22 06:36:11 +0000
committerbors <bors@rust-lang.org>2018-06-22 06:36:11 +0000
commit7dae5c0e06f10042fc3b29a55bf6285e539c06db (patch)
treeb5d5243140f0919ede4e9d5771dd73ea6b7593f8 /src/libsyntax/parse
parent4b17d31f1147f840231c43b1ac1478a497af20df (diff)
parent8289bf2994cc0522616275594cd2bd1a8d10d4b4 (diff)
downloadrust-7dae5c0e06f10042fc3b29a55bf6285e539c06db.tar.gz
rust-7dae5c0e06f10042fc3b29a55bf6285e539c06db.zip
Auto merge of #51686 - nikomatsakis:issue-51415-borrowck-match-default-bindings-bug, r=eddyb
yet another "old borrowck" bug around match default bindings

We were getting the type of the parameter from its pattern, but that didn't include adjustments. I did a `ripgrep` around and this seemed to be the only affected case.

The reason this didn't show up as an ICE earlier is that mem-categorization is lenient with respect to weird discrepancies. I am going to add more delay-span-bug calls shortly around that (I'll push onto the PR).

This example is an ICE, but I presume that there is a way to make a soundness example out of this -- it basically ignores borrows occuring inside match-default-bindings in a closure, though only if the implicit deref is at the top-level. It happens though that this occurs frequently in iterators, which often give a `&T` parameter.

Fixes #51415
Fixes #49534

r? @eddyb
Diffstat (limited to 'src/libsyntax/parse')
0 files changed, 0 insertions, 0 deletions