diff options
| author | Oliver Schneider <git-spam9815368754983@oli-obk.de> | 2015-07-28 18:07:20 +0200 |
|---|---|---|
| committer | Oliver Schneider <git-spam9815368754983@oli-obk.de> | 2015-07-28 18:07:20 +0200 |
| commit | 00a5e66f818ad9d79cc4425f5564c7b07e3213a6 (patch) | |
| tree | f97ac3137f954aaf4866484a7de6f420280b9125 /src/libsyntax/ext/quote.rs | |
| parent | 9ca511cf63c3611ffae9218945724c1b32025688 (diff) | |
| download | rust-00a5e66f818ad9d79cc4425f5564c7b07e3213a6.tar.gz rust-00a5e66f818ad9d79cc4425f5564c7b07e3213a6.zip | |
remove `get_ident` and `get_name`, make `as_str` sound
Diffstat (limited to 'src/libsyntax/ext/quote.rs')
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 82c249d2585..b8168297190 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -407,7 +407,7 @@ fn id_ext(str: &str) -> ast::Ident { // Lift an ident to the expr that evaluates to that ident. fn mk_ident(cx: &ExtCtxt, sp: Span, ident: ast::Ident) -> P<ast::Expr> { - let e_str = cx.expr_str(sp, token::get_ident(ident)); + let e_str = cx.expr_str(sp, ident.name.as_str()); cx.expr_method_call(sp, cx.expr_ident(sp, id_ext("ext_cx")), id_ext("ident_of"), @@ -416,7 +416,7 @@ fn mk_ident(cx: &ExtCtxt, sp: Span, ident: ast::Ident) -> P<ast::Expr> { // Lift a name to the expr that evaluates to that name fn mk_name(cx: &ExtCtxt, sp: Span, ident: ast::Ident) -> P<ast::Expr> { - let e_str = cx.expr_str(sp, token::get_ident(ident)); + let e_str = cx.expr_str(sp, ident.name.as_str()); cx.expr_method_call(sp, cx.expr_ident(sp, id_ext("ext_cx")), id_ext("name_of"), |
