]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/ty.rs
Simplify PatIdent to contain an Ident rather than a Path
[rust.git] / src / librustc / middle / ty.rs
index 79630be7c5e0840c21dfdf99228ed5bbede7f7ac..9629fb38af80fb62cf58726d520725b139aba143 100644 (file)
@@ -2771,8 +2771,8 @@ pub fn local_var_name_str(cx: &ctxt, id: NodeId) -> InternedString {
     match cx.map.find(id) {
         Some(ast_map::NodeLocal(pat)) => {
             match pat.node {
-                ast::PatIdent(_, ref path, _) => {
-                    token::get_ident(ast_util::path_to_ident(path))
+                ast::PatIdent(_, ref path1, _) => {
+                    token::get_ident(path1.node)
                 }
                 _ => {
                     cx.sess.bug(