X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_expand%2Fsrc%2Fbuild.rs;h=03dbc07e5dc3e0c3968b3623fb53e8b7e80aa7ae;hb=6b7ca2fcf2ebbba705f7a98c00bd56b5348ee9d7;hp=0952e65cfee3d590b3643a1d2d96a33acfacd190;hpb=13f47f608e8e9fcdd60f64688e12f5f4c2f7c317;p=rust.git diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index 0952e65cfee..03dbc07e5dc 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -334,8 +334,8 @@ pub fn expr_struct_ident( } fn expr_lit(&self, span: Span, lit_kind: ast::LitKind) -> P { - let lit = ast::Lit::from_lit_kind(lit_kind, span); - self.expr(span, ast::ExprKind::Lit(lit)) + let token_lit = lit_kind.to_token_lit(); + self.expr(span, ast::ExprKind::Lit(token_lit)) } pub fn expr_usize(&self, span: Span, i: usize) -> P { @@ -532,15 +532,15 @@ pub fn lambda(&self, span: Span, ids: Vec, body: P) -> P