diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2025-08-27 06:06:11 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2025-08-27 06:06:11 +0900 |
| commit | adddae65368c28d36c4202458aa9bf387c5a6d06 (patch) | |
| tree | 8fa5a0149e997fcb74aa8217641f5f16b805c279 /compiler/rustc_builtin_macros | |
| parent | f5703d5dd3eec176f86a6e9bf7e668b48b84eabb (diff) | |
| download | rust-adddae65368c28d36c4202458aa9bf387c5a6d06.tar.gz rust-adddae65368c28d36c4202458aa9bf387c5a6d06.zip | |
stop returning errors when format foreign has trailing dollar
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. |
