Don't emit duplicate errors for the return place
This commit is contained in:
parent
5b3145574e
commit
b400871b9c
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue