Skip to content

Commit 761c85b

Browse files
committed
---
yaml --- r: 271615 b: refs/heads/auto c: ff014a3 h: refs/heads/master i: 271613: c57ab31 271611: 3518135 271607: e163ed5 271599: 42490a4 271583: b881647 271551: 21975b1 271487: 199ea27 271359: b48de84
1 parent 4ee6622 commit 761c85b

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 7bc6c75d0f6ec012e8baa1f59f80d2c53faefd3b
11+
refs/heads/auto: ff014a3a10c3ae2bcf52744736d7c0e3f095612a
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/librustc_resolve/build_reduced_graph.rs

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use resolve_imports::ImportDirectiveSubclass::{self, SingleImport, GlobImport};
1919
use Module;
2020
use Namespace::{self, TypeNS, ValueNS};
2121
use {NameBinding, NameBindingKind};
22-
use module_to_string;
2322
use ParentLink::{ModuleParentLink, BlockParentLink};
2423
use Resolver;
2524
use {resolve_error, resolve_struct_error, ResolutionError};
@@ -547,34 +546,14 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
547546
}
548547
}
549548

550-
/// Builds the reduced graph rooted at the given external module.
551-
fn populate_external_module(&mut self, module: Module<'b>) {
552-
debug!("(populating external module) attempting to populate {}",
553-
module_to_string(module));
554-
555-
let def_id = match module.def_id() {
556-
None => {
557-
debug!("(populating external module) ... no def ID!");
558-
return;
559-
}
560-
Some(def_id) => def_id,
561-
};
562-
563-
for child in self.session.cstore.item_children(def_id) {
564-
debug!("(populating external module) ... found ident: {}",
565-
child.name);
566-
self.build_reduced_graph_for_external_crate_def(module, child);
567-
}
568-
module.populated.set(true)
569-
}
570-
571549
/// Ensures that the reduced graph rooted at the given external module
572550
/// is built, building it if it is not.
573551
fn populate_module_if_necessary(&mut self, module: Module<'b>) {
574-
if !module.populated.get() {
575-
self.populate_external_module(module)
552+
if module.populated.get() { return }
553+
for child in self.session.cstore.item_children(module.def_id().unwrap()) {
554+
self.build_reduced_graph_for_external_crate_def(module, child);
576555
}
577-
assert!(module.populated.get())
556+
module.populated.set(true)
578557
}
579558

580559
/// Builds the reduced graph rooted at the 'use' directive for an external

0 commit comments

Comments
 (0)