@@ -99,8 +99,8 @@ pub struct CrateDebugContext {
99
99
priv current_debug_location : DebugLocation ,
100
100
priv created_files : HashMap < ~str , DIFile > ,
101
101
priv created_types : HashMap < uint , DIType > ,
102
- priv local_namespace_map : HashMap < ast:: NodeId , @NamespaceTree > ,
103
- priv extern_namespaces : HashMap < ~[ ast:: Ident ] , @NamespaceTree > ,
102
+ priv local_namespace_map : HashMap < ast:: NodeId , @NamespaceTreeNode > ,
103
+ priv extern_namespaces : HashMap < ~[ ast:: Ident ] , @NamespaceTreeNode > ,
104
104
}
105
105
106
106
impl CrateDebugContext {
@@ -2369,13 +2369,13 @@ fn populate_scope_map(cx: &mut CrateContext,
2369
2369
// Namespace Handling
2370
2370
//=-------------------------------------------------------------------------------------------------
2371
2371
2372
- struct NamespaceTree {
2372
+ struct NamespaceTreeNode {
2373
2373
ident: ast:: Ident ,
2374
2374
scope: DIScope ,
2375
- parent: Option <@NamespaceTree >,
2375
+ parent: Option <@NamespaceTreeNode >,
2376
2376
}
2377
2377
2378
- impl NamespaceTree {
2378
+ impl NamespaceTreeNode {
2379
2379
fn mangled_name_of_contained_item( & self , item_name: & str) -> ~str {
2380
2380
let mut name = ~"_ZN";
2381
2381
fill_nested ( self , & mut name) ;
@@ -2385,7 +2385,7 @@ impl NamespaceTree {
2385
2385
2386
2386
return name;
2387
2387
2388
- fn fill_nested ( node : & NamespaceTree , output : & mut ~str ) {
2388
+ fn fill_nested ( node : & NamespaceTreeNode , output : & mut ~str ) {
2389
2389
match node. parent {
2390
2390
Some ( parent) => {
2391
2391
fill_nested ( parent, output) ;
@@ -2400,15 +2400,15 @@ impl NamespaceTree {
2400
2400
2401
2401
fn namespace_for_external_item( cx: & mut CrateContext ,
2402
2402
item_path: & ast_map:: path)
2403
- -> @NamespaceTree {
2403
+ -> @NamespaceTreeNode {
2404
2404
if item_path. len ( ) < 2 {
2405
2405
cx. sess . bug ( fmt ! ( "debuginfo::namespace_for_external_item() - Invalid item_path: %s" ,
2406
2406
ast_map:: path_to_str( * item_path, token:: get_ident_interner( ) ) ) ) ;
2407
2407
}
2408
2408
2409
2409
let path_excluding_item = item_path. slice_to ( item_path. len ( ) - 1 ) ;
2410
2410
let mut current_key = vec:: with_capacity ( path_excluding_item. len ( ) ) ;
2411
- let mut parent_node: Option < @NamespaceTree > = None ;
2411
+ let mut parent_node: Option < @NamespaceTreeNode > = None ;
2412
2412
let last_index = path_excluding_item. len ( ) - 1 ;
2413
2413
2414
2414
for ( i, & path_element) in path_excluding_item. iter ( ) . enumerate ( ) {
@@ -2442,7 +2442,7 @@ fn namespace_for_external_item(cx: &mut CrateContext,
2442
2442
}
2443
2443
} ;
2444
2444
2445
- let node = @NamespaceTree {
2445
+ let node = @NamespaceTreeNode {
2446
2446
ident : ident,
2447
2447
scope : namespace_metadata,
2448
2448
parent : parent_node,
@@ -2466,7 +2466,7 @@ fn namespace_for_external_item(cx: &mut CrateContext,
2466
2466
2467
2467
struct NamespaceVisitor < ' self > {
2468
2468
module_ident : ast:: Ident ,
2469
- scope_stack : ~[ @NamespaceTree ] ,
2469
+ scope_stack : ~[ @NamespaceTreeNode ] ,
2470
2470
crate_context : & ' self mut CrateContext ,
2471
2471
}
2472
2472
@@ -2484,7 +2484,7 @@ impl<'self> NamespaceVisitor<'self> {
2484
2484
2485
2485
fn new_function_visitor < ' a > ( cx : & ' a mut CrateContext ,
2486
2486
function_name : & str ,
2487
- parent_node : Option < @NamespaceTree > ,
2487
+ parent_node : Option < @NamespaceTreeNode > ,
2488
2488
file_metadata : DIFile ,
2489
2489
span : Span )
2490
2490
-> NamespaceVisitor < ' a > {
@@ -2507,7 +2507,7 @@ impl<'self> NamespaceVisitor<'self> {
2507
2507
}
2508
2508
} ;
2509
2509
2510
- let function_node = @NamespaceTree {
2510
+ let function_node = @NamespaceTreeNode {
2511
2511
scope : namespace_metadata,
2512
2512
ident : companion_ident,
2513
2513
parent : parent_node,
@@ -2552,7 +2552,7 @@ impl<'self> visit::Visitor<()> for NamespaceVisitor<'self> {
2552
2552
}
2553
2553
} ;
2554
2554
2555
- let this_node = @NamespaceTree {
2555
+ let this_node = @NamespaceTreeNode {
2556
2556
scope : namespace_metadata,
2557
2557
ident : self . module_ident ,
2558
2558
parent : parent_node,
0 commit comments