]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_borrowck/borrowck/mod.rs
remove `get_ident` and `get_name`, make `as_str` sound
[rust.git] / src / librustc_borrowck / borrowck / mod.rs
index 8f2e5deb92c7dd5f9be9487f7e576f1b9a108e56..5e46a17ac583d0cefa533904399baba4395bbcce 100644 (file)
@@ -39,7 +39,6 @@
 use syntax::ast;
 use syntax::ast_util;
 use syntax::codemap::Span;
-use syntax::parse::token;
 use syntax::visit;
 use syntax::visit::{Visitor, FnKind};
 use syntax::ast::{FnDecl, Block, NodeId};
@@ -1065,7 +1064,7 @@ pub fn append_loan_path_to_string(&self,
                 match fname {
                     mc::NamedField(fname) => {
                         out.push('.');
-                        out.push_str(&token::get_name(fname));
+                        out.push_str(&fname.as_str());
                     }
                     mc::PositionalField(idx) => {
                         out.push('.');