about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-09-06 23:19:11 -0700
committerJohn Clements <clements@racket-lang.org>2013-09-06 23:19:11 -0700
commitb6f3d3f24546a525d1eb80923692c1296eddc4dc (patch)
tree9c07e354ea468f879fae062d326460337599062b
parent956129cbb2a86b0d95e283b60a076934bd3a1e3a (diff)
ident->name in debuginfo
-rw-r--r--src/librustc/middle/trans/debuginfo.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs
index 646f71ec28a..e4879ef4a11 100644
--- a/src/librustc/middle/trans/debuginfo.rs
+++ b/src/librustc/middle/trans/debuginfo.rs
@@ -1012,7 +1012,7 @@ fn struct_metadata(cx: &mut CrateContext,
 
     let field_llvm_types = do fields.map |field| { type_of::type_of(cx, field.mt.ty) };
     let field_names = do fields.map |field| {
-        if field.ident == special_idents::unnamed_field {
+        if field.ident.name == special_idents::unnamed_field.name {
             ~""
         } else {
             cx.sess.str_of(field.ident).to_owned()
@@ -1875,9 +1875,12 @@ fn populate_scope_map(cx: &mut CrateContext,
                     // }
 
                     // Is there already a binding with that name?
+                    // N.B.: this comparison must be UNhygienic... because
+                    // gdb knows nothing about the context, so any two
+                    // variables with the same name will cause the problem.
                     let need_new_scope = scope_stack
                         .iter()
-                        .any(|entry| entry.ident.iter().any(|i| *i == ident));
+                        .any(|entry| entry.ident.iter().any(|i| i.name == ident.name));
 
                     if need_new_scope {
                         // Create a new lexical scope and push it onto the stack