@@ -14,7 +14,7 @@ use self::MemberDescriptionFactory::*;
1414use self :: EnumDiscriminantInfo :: * ;
1515
1616use super :: utils:: { debug_context, DIB , span_start, bytes_to_bits, size_and_align_of,
17- get_namespace_and_span_for_item , create_DIArray, is_node_local_to_unit} ;
17+ get_namespace_for_item , create_DIArray, is_node_local_to_unit} ;
1818use super :: namespace:: mangled_name_of_item;
1919use super :: type_names:: compute_debuginfo_type_name;
2020use super :: { CrateDebugContext } ;
@@ -421,7 +421,7 @@ fn trait_pointer_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
421421 let containing_scope = match trait_type. sty {
422422 ty:: TyDynamic ( ref data, ..) => if let Some ( principal) = data. principal ( ) {
423423 let def_id = principal. def_id ( ) ;
424- get_namespace_and_span_for_item ( cx, def_id) . 0
424+ get_namespace_for_item ( cx, def_id)
425425 } else {
426426 NO_SCOPE_METADATA
427427 } ,
@@ -971,7 +971,7 @@ fn prepare_struct_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
971971 _ => bug ! ( "prepare_struct_metadata on a non-ADT" )
972972 } ;
973973
974- let ( containing_scope, _ ) = get_namespace_and_span_for_item ( cx, struct_def_id) ;
974+ let containing_scope = get_namespace_for_item ( cx, struct_def_id) ;
975975
976976 let struct_metadata_stub = create_struct_stub ( cx,
977977 struct_llvm_type,
@@ -1096,7 +1096,7 @@ fn prepare_union_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
10961096 _ => bug ! ( "prepare_union_metadata on a non-ADT" )
10971097 } ;
10981098
1099- let ( containing_scope, _ ) = get_namespace_and_span_for_item ( cx, union_def_id) ;
1099+ let containing_scope = get_namespace_for_item ( cx, union_def_id) ;
11001100
11011101 let union_metadata_stub = create_union_stub ( cx,
11021102 union_llvm_type,
@@ -1483,7 +1483,7 @@ fn prepare_enum_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
14831483 -> RecursiveTypeDescription < ' tcx > {
14841484 let enum_name = compute_debuginfo_type_name ( cx, enum_type, false ) ;
14851485
1486- let ( containing_scope, _ ) = get_namespace_and_span_for_item ( cx, enum_def_id) ;
1486+ let containing_scope = get_namespace_for_item ( cx, enum_def_id) ;
14871487 // FIXME: This should emit actual file metadata for the enum, but we
14881488 // currently can't get the necessary information when it comes to types
14891489 // imported from other crates. Formerly we violated the ODR when performing
@@ -1781,7 +1781,8 @@ pub fn create_global_var_metadata(cx: &CrateContext,
17811781 let tcx = cx. tcx ( ) ;
17821782
17831783 let node_def_id = tcx. hir . local_def_id ( node_id) ;
1784- let ( var_scope, span) = get_namespace_and_span_for_item ( cx, node_def_id) ;
1784+ let var_scope = get_namespace_for_item ( cx, node_def_id) ;
1785+ let span = cx. tcx ( ) . def_span ( node_def_id) ;
17851786
17861787 let ( file_metadata, line_number) = if span != syntax_pos:: DUMMY_SP {
17871788 let loc = span_start ( cx, span) ;
0 commit comments