From 0b8bd6f6672739ca874b4d9fd8122dc30610cd26 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 23 Oct 2014 17:20:57 +0200 Subject: [PATCH] plugin-guide: nicer creation of the parser --- src/doc/guide-plugin.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/doc/guide-plugin.md b/src/doc/guide-plugin.md index 3830a2126e17..d560a5c3b683 100644 --- a/src/doc/guide-plugin.md +++ b/src/doc/guide-plugin.md @@ -151,8 +151,7 @@ higher-level syntax elements like expressions: fn expand_foo(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree]) -> Box { - let mut parser = - parse::new_parser_from_tts(cx.parse_sess(), cx.cfg(), args.to_slice()) + let mut parser = cx.new_parser_from_tts(args); let expr: P = parser.parse_expr(); ```