Don't emit duplicate errors for the return place

This commit is contained in:
Dylan MacKenzie 2020-09-29 17:30:07 -07:00
parent 5b3145574e
commit b400871b9c

View File

@ -237,7 +237,8 @@ impl Validator<'mir, 'tcx> {
self.check_item_predicates();
for (idx, local) in body.local_decls.iter_enumerated() {
if local.internal {
// Handle the return place below.
if idx == RETURN_PLACE || local.internal {
continue;
}