Skip to content

Commit c3ffbc3

Browse files
debuginfo: Fix style nits for pull request.
1 parent ccb721a commit c3ffbc3

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

src/librustc/lib/llvm.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2120,7 +2120,6 @@ pub mod llvm {
21202120
#[fast_ffi]
21212121
pub fn LLVMDICompositeTypeSetTypeArray(CompositeType: ValueRef, TypeArray: ValueRef);
21222122

2123-
21242123
#[fast_ffi]
21252124
pub fn LLVMIsAArgument(value_ref: ValueRef) -> ValueRef;
21262125

src/librustc/middle/trans/debuginfo.rs

+10-11
Original file line numberDiff line numberDiff line change
@@ -601,10 +601,8 @@ pub fn create_function_debug_context(cx: &mut CrateContext,
601601
_) => {
602602
(ident, fn_decl, generics, Some(top_level_block), span)
603603
}
604-
ast_map::node_foreign_item(@ast::foreign_item { _ }, _, _, _) => {
605-
return FunctionWithoutDebugInfo;
606-
}
607-
ast_map::node_variant(*) |
604+
ast_map::node_foreign_item(@ast::foreign_item { _ }, _, _, _) |
605+
ast_map::node_variant(*) |
608606
ast_map::node_struct_ctor(*) => {
609607
return FunctionWithoutDebugInfo;
610608
}
@@ -1166,9 +1164,10 @@ impl RecursiveTypeDescription {
11661164
// Insert the stub into the cache in order to allow recursive references ...
11671165
debug_context(cx).created_types.insert(cache_id, metadata_stub);
11681166

1169-
// ... then create the member descriptions
1167+
// ... then create the member descriptions ...
11701168
let member_descriptions = member_description_factory(cx);
11711169

1170+
// ... and attach them to the stub to complete it.
11721171
set_members_of_composite_type(cx,
11731172
metadata_stub,
11741173
llvm_type,
@@ -1465,7 +1464,7 @@ fn prepare_enum_metadata(cx: &mut CrateContext,
14651464
}
14661465

14671466
enum MemberOffset {
1468-
FixedMemberOffset{ bytes: uint },
1467+
FixedMemberOffset { bytes: uint },
14691468
// For ComputedMemberOffset, the offset is read from the llvm type definition
14701469
ComputedMemberOffset
14711470
}
@@ -1863,14 +1862,14 @@ fn trait_metadata(cx: &mut CrateContext,
18631862
// the trait's methods.
18641863
let path = ty::item_path(cx.tcx, def_id);
18651864
let ident = path.last().ident();
1866-
let name = ppaux::trait_store_to_str(cx.tcx, trait_store)
1867-
+ ppaux::mutability_to_str(mutability)
1868-
+ token::ident_to_str(&ident);
1865+
let name = ppaux::trait_store_to_str(cx.tcx, trait_store) +
1866+
ppaux::mutability_to_str(mutability) +
1867+
token::ident_to_str(&ident);
18691868
// Add type and region parameters
18701869
let name = ppaux::parameterized(cx.tcx, name, &substs.regions, substs.tps);
18711870

1872-
let (containing_scope,
1873-
definition_span) = get_namespace_and_span_for_item(cx, def_id, usage_site_span);
1871+
let (containing_scope, definition_span) =
1872+
get_namespace_and_span_for_item(cx, def_id, usage_site_span);
18741873

18751874
let file_name = span_start(cx, definition_span).file.name;
18761875
let file_metadata = file_metadata(cx, file_name);

src/test/debug-info/trait-pointers.rs

-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,3 @@ fn main() {
3131
let managed: @Trait = @Struct { a:2, b: 3.0 } as @Trait;
3232
let unique: ~Trait = ~Struct { a:2, b: 3.0 } as ~Trait;
3333
}
34-
35-
fn zzz() {()}

0 commit comments

Comments
 (0)