Skip to content

Commit ff6dd5c

Browse files
committed
Avoid change to current module on escape from callback
1 parent f4ea392 commit ff6dd5c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_resolve/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,9 +2624,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
26242624
visit::walk_block(self, block);
26252625

26262626
// Move back up.
2627-
self.current_module = orig_module;
2628-
26292627
if !self.resolved {
2628+
self.current_module = orig_module;
26302629
self.value_ribs.pop();
26312630
}
26322631
debug!("(resolving block) leaving block");

0 commit comments

Comments
 (0)