X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_parse%2Fsrc%2Fparser%2Fpat.rs;h=b3af37a5f7029241d538fe34d1a31abdb179b340;hb=c9ccb0ba2853f97886bdd2b5ea1839839e5e6229;hp=52c11b4e35f34372b59e21ac27037cc38e9a7269;hpb=d2d44f619f98383a26c1f8e4da15862d98467d4e;p=rust.git diff --git a/compiler/rustc_parse/src/parser/pat.rs b/compiler/rustc_parse/src/parser/pat.rs index 52c11b4e35f..b3af37a5f70 100644 --- a/compiler/rustc_parse/src/parser/pat.rs +++ b/compiler/rustc_parse/src/parser/pat.rs @@ -420,7 +420,7 @@ fn parse_pat_with_range_pat( err.span_label(self_.token.span, format!("expected {}", expected)); err }); - PatKind::Lit(self.mk_expr(lo, ExprKind::Lit(lit))) + PatKind::Lit(self.mk_expr(lo, ExprKind::Lit(lit.token_lit))) } else { // Try to parse everything else as literal with optional minus match self.parse_literal_maybe_minus() {