mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
Don't emit duplicate errors for the return place
This commit is contained in:
parent
5b3145574e
commit
b400871b9c
@ -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…
Reference in New Issue
Block a user