Skip to content

Commit b6f3d3f

Browse files
committed
ident->name in debuginfo
1 parent 956129c commit b6f3d3f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/librustc/middle/trans/debuginfo.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ fn struct_metadata(cx: &mut CrateContext,
10121012

10131013
let field_llvm_types = do fields.map |field| { type_of::type_of(cx, field.mt.ty) };
10141014
let field_names = do fields.map |field| {
1015-
if field.ident == special_idents::unnamed_field {
1015+
if field.ident.name == special_idents::unnamed_field.name {
10161016
~""
10171017
} else {
10181018
cx.sess.str_of(field.ident).to_owned()
@@ -1875,9 +1875,12 @@ fn populate_scope_map(cx: &mut CrateContext,
18751875
// }
18761876

18771877
// Is there already a binding with that name?
1878+
// N.B.: this comparison must be UNhygienic... because
1879+
// gdb knows nothing about the context, so any two
1880+
// variables with the same name will cause the problem.
18781881
let need_new_scope = scope_stack
18791882
.iter()
1880-
.any(|entry| entry.ident.iter().any(|i| *i == ident));
1883+
.any(|entry| entry.ident.iter().any(|i| i.name == ident.name));
18811884

18821885
if need_new_scope {
18831886
// Create a new lexical scope and push it onto the stack

0 commit comments

Comments
 (0)