diff options
| author | bors <bors@rust-lang.org> | 2024-04-04 17:50:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-04 17:50:22 +0000 |
| commit | 9725c4a162502a02c1c67fdca6b797fe09b2b73c (patch) | |
| tree | 6c46b3f31a18f2773ae2683c588898c4fa4d9415 /clippy_lints/src/raw_strings.rs | |
| parent | 5a9e9b0e65d27bb294a5e13ca554878b43af6224 (diff) | |
| parent | bb023e90d8dfbdee714aa33cfa44b91753a99a03 (diff) | |
Auto merge of #12632 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
Diffstat (limited to 'clippy_lints/src/raw_strings.rs')
| -rw-r--r-- | clippy_lints/src/raw_strings.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clippy_lints/src/raw_strings.rs b/clippy_lints/src/raw_strings.rs index ac29d27303c..7e71f48c6d9 100644 --- a/clippy_lints/src/raw_strings.rs +++ b/clippy_lints/src/raw_strings.rs @@ -108,7 +108,7 @@ impl EarlyLintPass for RawStrings { } } - let req = { + let mut req = { let mut following_quote = false; let mut req = 0; // `once` so a raw string ending in hashes is still checked @@ -136,7 +136,9 @@ impl EarlyLintPass for RawStrings { ControlFlow::Continue(num) | ControlFlow::Break(num) => num, } }; - + if self.allow_one_hash_in_raw_strings { + req = req.max(1); + } if req < max { span_lint_and_then( cx, |
