Skip to content

Commit 1df72d2

Browse files
committed
---
yaml --- r: 273101 b: refs/heads/beta c: 9ca3ff1 h: refs/heads/master i: 273099: d1aa865
1 parent bf47571 commit 1df72d2

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: fa18403a2f4acf203964c2ea7c8660752ee99cc3
26+
refs/heads/beta: 9ca3ff16ad14e187b970ac1714b9e050ccbbf825
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_resolve/resolve_imports.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,6 @@ impl<'a> ::ModuleS<'a> {
276276
.increment_outstanding_references(is_public);
277277
}
278278

279-
fn decrement_outstanding_references_for(&self, name: Name, ns: Namespace, is_public: bool) {
280-
self.update_resolution(name, ns, |resolution| {
281-
resolution.decrement_outstanding_references(is_public);
282-
})
283-
}
284-
285279
// Use `update` to mutate the resolution for the name.
286280
// If the resolution becomes a success, define it in the module's glob importers.
287281
fn update_resolution<T, F>(&self, name: Name, ns: Namespace, update: F) -> T
@@ -485,7 +479,8 @@ impl<'a, 'b:'a, 'tcx:'b> ImportResolver<'a, 'b, 'tcx> {
485479
// Temporarily count the directive as determined so that the resolution fails
486480
// (as opposed to being indeterminate) when it can only be defined by the directive.
487481
if !determined {
488-
module_.decrement_outstanding_references_for(target, ns, directive.is_public)
482+
module_.resolutions.borrow_mut().get_mut(&(target, ns)).unwrap()
483+
.decrement_outstanding_references(directive.is_public);
489484
}
490485
let result =
491486
self.resolver.resolve_name_in_module(target_module, source, ns, false, true);
@@ -522,7 +517,10 @@ impl<'a, 'b:'a, 'tcx:'b> ImportResolver<'a, 'b, 'tcx> {
522517
self.report_conflict(target, ns, &directive.import(binding, None), old_binding);
523518
}
524519
}
525-
module_.decrement_outstanding_references_for(target, ns, directive.is_public);
520+
521+
module_.update_resolution(target, ns, |resolution| {
522+
resolution.decrement_outstanding_references(directive.is_public);
523+
})
526524
}
527525

528526
match (&value_result, &type_result) {

0 commit comments

Comments
 (0)