]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/kind.rs
Simplify PatIdent to contain an Ident rather than a Path
[rust.git] / src / librustc / middle / kind.rs
index 34754f045ffce8b00ecc1d677d3c2df6b6d536b5..8163331667198a8b48035291d786c7c44a3cd93b 100644 (file)
@@ -20,7 +20,7 @@
 use syntax::ast::*;
 use syntax::attr;
 use syntax::codemap::Span;
-use syntax::print::pprust::{expr_to_str,path_to_str};
+use syntax::print::pprust::{expr_to_str, ident_to_str};
 use syntax::{visit};
 use syntax::visit::Visitor;
 
@@ -627,7 +627,7 @@ fn check_sized(tcx: &ty::ctxt, ty: ty::t, name: String, sp: Span) {
 fn check_pat(cx: &mut Context, pat: &Pat) {
     let var_name = match pat.node {
         PatWild => Some("_".to_string()),
-        PatIdent(_, ref path, _) => Some(path_to_str(path).to_string()),
+        PatIdent(_, ref path1, _) => Some(ident_to_str(&path1.node).to_string()),
         _ => None
     };