]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/tt/transcribe.rs
remove `get_ident` and `get_name`, make `as_str` sound
[rust.git] / src / libsyntax / ext / tt / transcribe.rs
index 368a9f0c27e56fd3e721693bd308702c82d5c75f..0ca755c97b1582e212341262136a2c77855f7615 100644 (file)
@@ -140,11 +140,9 @@ fn add(self, other: LockstepIterSize) -> LockstepIterSize {
                 LisContradiction(_) => other,
                 LisConstraint(r_len, _) if l_len == r_len => self.clone(),
                 LisConstraint(r_len, r_id) => {
-                    let l_n = token::get_ident(l_id.clone());
-                    let r_n = token::get_ident(r_id);
                     LisContradiction(format!("inconsistent lockstep iteration: \
-                                              '{:?}' has {} items, but '{:?}' has {}",
-                                              l_n, l_len, r_n, r_len).to_string())
+                                              '{}' has {} items, but '{}' has {}",
+                                              l_id, l_len, r_id, r_len))
                 }
             },
         }
@@ -308,8 +306,8 @@ pub fn tt_next_token(r: &mut TtReader) -> TokenAndSpan {
                             MatchedSeq(..) => {
                                 panic!(r.sp_diag.span_fatal(
                                     r.cur_span, /* blame the macro writer */
-                                    &format!("variable '{:?}' is still repeating at this depth",
-                                            token::get_ident(ident))));
+                                    &format!("variable '{}' is still repeating at this depth",
+                                            ident)));
                             }
                         }
                     }