diff options
| author | bors <bors@rust-lang.org> | 2022-02-04 14:33:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-02-04 14:33:00 +0000 |
| commit | cb18e83e8512be69b26fcb67ae66d81e5b7a4383 (patch) | |
| tree | 66c8c85ce1055300fb81783ae74a5ec3f605714b /compiler/rustc_parse/src/parser | |
| parent | 4e8fb743ccbec27344b2dd42de7057f41d4ebfdd (diff) | |
| parent | 1426f0e6f03d64902ac75a47eba800cbf82d7d41 (diff) | |
| download | rust-cb18e83e8512be69b26fcb67ae66d81e5b7a4383.tar.gz rust-cb18e83e8512be69b26fcb67ae66d81e5b7a4383.zip | |
Auto merge of #93645 - matthiaskrgr:rollup-eua2621, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - #92735 (Add crate filter parameter in URL) - #93402 (Windows: Disable LLVM crash dialog boxes.) - #93508 (Add rustdoc info to jsondocck output) - #93551 (Add package.json in gitignore) - #93555 (Link `try_exists` docs to `Path::exists`) - #93585 (Missing tests for #92630) - #93593 (Fix ret > 1 bound if shadowed by const) - #93630 (clippy::perf fixes) - #93631 (rustc_mir_dataflow: use iter::once instead of Some().into_iter) - #93632 (rustdoc: clippy::complexity fixes) - #93638 (rustdoc: remove unused Hash impl) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -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 0115d498a7f..4898a4844b9 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -1702,11 +1702,11 @@ impl<'a> Parser<'a> { // Try to lowercase the prefix if it's a valid base prefix. fn fix_base_capitalisation(s: &str) -> Option<String> { - if let Some(stripped) = s.strip_prefix("B") { + if let Some(stripped) = s.strip_prefix('B') { Some(format!("0b{stripped}")) - } else if let Some(stripped) = s.strip_prefix("O") { + } else if let Some(stripped) = s.strip_prefix('O') { Some(format!("0o{stripped}")) - } else if let Some(stripped) = s.strip_prefix("X") { + } else if let Some(stripped) = s.strip_prefix('X') { Some(format!("0x{stripped}")) } else { None |
