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
1 changed files with 2 additions and 1 deletions

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;
}