diff --git a/src/plugin.rs b/src/plugin.rs index c7c869f..cfe37fd 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -82,7 +82,7 @@ fn parse_json(cx: &ExtCtxt, parser: &mut Parser) -> P { ($expr).to_json() }}) }, - &Token::Ident(id, IdentStyle::Plain) if id.as_str() == "null" => { + &Token::Ident(id, IdentStyle::Plain) if id.name.as_str() == "null" => { let _ = parser.bump(); quote_expr!(cx, { ::rustc_serialize::json::Json::Null }) },