diff options
| author | bors <bors@rust-lang.org> | 2023-08-02 06:03:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-02 06:03:16 +0000 |
| commit | f1280576ec204f1cf9060e6c3918c22a2f185ee5 (patch) | |
| tree | 535cb16a7a96d1046a48966e8a5a0812b0a63ac3 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 320cd7d55111dc8acc4b2f4e6d4c51c4eba60d3e (diff) | |
| parent | 2d01258c122f2218ca79bfd75ae6cd2354e12cb1 (diff) | |
| download | rust-f1280576ec204f1cf9060e6c3918c22a2f185ee5.tar.gz rust-f1280576ec204f1cf9060e6c3918c22a2f185ee5.zip | |
Auto merge of #3003 - rust-lang:rustup-2023-08-02, r=RalfJung
Automatic sync from rustc
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 6 |
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(( |
