diff --git a/src/doc/guide-plugin.md b/src/doc/guide-plugin.md index 83a5697f75a6..1145235c5f89 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(); ```