about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorThe Miri Conjob Bot <miri@cron.bot>2023-08-02 05:42:32 +0000
committerThe Miri Conjob Bot <miri@cron.bot>2023-08-02 05:42:32 +0000
commit743be666d4bc8c387a7c03515605203943b2c540 (patch)
treeb84cb8f0eece21ca5ab83c2c008ecd08b2df13ed /compiler/rustc_parse/src/parser/expr.rs
parent552700aa762d2f18f3f873501fbb103491ab8382 (diff)
parentac25636a8f1efa40d368eaec363b01b748e193a1 (diff)
downloadrust-743be666d4bc8c387a7c03515605203943b2c540.tar.gz
rust-743be666d4bc8c387a7c03515605203943b2c540.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 0e19a67a841..a0f447fc67b 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -1052,7 +1052,7 @@ impl<'a> Parser<'a> {
                 }
                 components.push(Punct(c));
             } else {
-                panic!("unexpected character in a float token: {:?}", c)
+                panic!("unexpected character in a float token: {c:?}")
             }
         }
         if !ident_like.is_empty() {
@@ -1113,7 +1113,7 @@ impl<'a> Parser<'a> {
                 self.error_unexpected_after_dot();
                 DestructuredFloat::Error
             }
-            _ => panic!("unexpected components in a float token: {:?}", components),
+            _ => panic!("unexpected components in a float token: {components:?}"),
         }
     }
 
@@ -2342,7 +2342,7 @@ impl<'a> Parser<'a> {
             let ty = if this.eat(&token::Colon) {
                 this.parse_ty()?
             } else {
-                this.mk_ty(this.prev_token.span, TyKind::Infer)
+                this.mk_ty(pat.span, TyKind::Infer)
             };
 
             Ok((