bors Auto merge of #4054 - alexcrichton:beta-next, r=alexcrichton
[beta] Change inferring bin's name logic

This is a backport of #4046
Latest commit 28d1d60 May 16, 2017