Skip to content

Commit 7c028c9

Browse files
committed
auto merge of #11772 : sanxiyn/rust/reexport, r=cmr
The field is always set to true.
2 parents 72e8889 + 0f36438 commit 7c028c9

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

src/librustc/middle/privacy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ impl<'a> Visitor<()> for EmbargoVisitor<'a> {
338338
let exp_map2 = self.exp_map2.borrow();
339339
assert!(exp_map2.get().contains_key(&id), "wut {:?}", id);
340340
for export in exp_map2.get().get(&id).iter() {
341-
if is_local(export.def_id) && export.reexport {
341+
if is_local(export.def_id) {
342342
self.reexports.insert(export.def_id.node);
343343
}
344344
}

src/librustc/middle/resolve.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ pub type ExportMap2 = @RefCell<HashMap<NodeId, ~[Export2]>>;
5555
pub struct Export2 {
5656
name: @str, // The name of the target.
5757
def_id: DefId, // The definition of the target.
58-
reexport: bool, // Whether this is a reexport.
5958
}
6059

6160
// This set contains all exported definitions from external crates. The set does
@@ -3364,22 +3363,19 @@ impl Resolver {
33643363
exports2: &mut ~[Export2],
33653364
name: Name,
33663365
namebindings: @NameBindings,
3367-
ns: Namespace,
3368-
reexport: bool) {
3366+
ns: Namespace) {
33693367
match namebindings.def_for_namespace(ns) {
33703368
Some(d) => {
3371-
debug!("(computing exports) YES: {} '{}' => {:?}",
3372-
if reexport { ~"reexport" } else { ~"export"},
3369+
debug!("(computing exports) YES: export '{}' => {:?}",
33733370
interner_get(name),
33743371
def_id_of_def(d));
33753372
exports2.push(Export2 {
3376-
reexport: reexport,
33773373
name: interner_get(name),
33783374
def_id: def_id_of_def(d)
33793375
});
33803376
}
33813377
d_opt => {
3382-
debug!("(computing reexports) NO: {:?}", d_opt);
3378+
debug!("(computing exports) NO: {:?}", d_opt);
33833379
}
33843380
}
33853381
}
@@ -3396,13 +3392,12 @@ impl Resolver {
33963392
for &ns in xs.iter() {
33973393
match importresolution.target_for_namespace(ns) {
33983394
Some(target) => {
3399-
debug!("(computing exports) maybe reexport '{}'",
3395+
debug!("(computing exports) maybe export '{}'",
34003396
interner_get(*name));
34013397
self.add_exports_of_namebindings(exports2,
34023398
*name,
34033399
target.bindings,
3404-
ns,
3405-
true)
3400+
ns)
34063401
}
34073402
_ => ()
34083403
}

0 commit comments

Comments
 (0)