diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-08-27 11:26:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-27 11:26:52 +0200 |
| commit | bd90013b397049e0ae939965add662d0a19761fb (patch) | |
| tree | b9ee2cbe3d0ab0038cf5f5f9296c7621f9f3db32 /compiler/rustc_builtin_macros | |
| parent | ecb377fc4a7200d67a0f6f5ad762dfb516086ac3 (diff) | |
| parent | 2c361f826756fa9c14e611c01b6f6717ecbd19f2 (diff) | |
| download | rust-bd90013b397049e0ae939965add662d0a19761fb.tar.gz rust-bd90013b397049e0ae939965add662d0a19761fb.zip | |
Rollup merge of #145905 - TaKO8Ki:fix-137580, r=nnethercote
Stop calling unwrap when format foreign has trailing dollar Fixes rust-lang/rust#137580
Diffstat (limited to 'compiler/rustc_builtin_macros')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/format_foreign.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/format_foreign.rs b/compiler/rustc_builtin_macros/src/format_foreign.rs index 3e5a26c0556..cf563a53973 100644 --- a/compiler/rustc_builtin_macros/src/format_foreign.rs +++ b/compiler/rustc_builtin_macros/src/format_foreign.rs @@ -416,7 +416,7 @@ pub(crate) mod printf { // Yes, this *is* the parameter. Some(('$', end2)) => { state = Flags; - parameter = Some(at.slice_between(end).unwrap().parse().unwrap()); + parameter = at.slice_between(end).unwrap().parse().ok(); move_to!(end2); } // Wait, no, actually, it's the width. |
