diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-08-02 07:53:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-02 07:53:32 +0000 |
| commit | e42586d4954508da87280eb0770ba05d25c70a23 (patch) | |
| tree | 87bc767e2e57e4d7c77960f7a5c56cb20bf011d2 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | cde155d1c1aba394db2463ebf4f56ddd8f568414 (diff) | |
| parent | 0f98da7c5ccb5e873ddc08aef7508213a98b6aaa (diff) | |
| download | rust-e42586d4954508da87280eb0770ba05d25c70a23.tar.gz rust-e42586d4954508da87280eb0770ba05d25c70a23.zip | |
fix: `let_with_type_underscore` don't eat closing paren in `let (i): _ = 0;` (#15386)
Apparently, one can surround a pattern with an arbitrary number of parens, and the resulting `Pat` won't include the span of those parens. And the previous approach extended the to-be-deleted span all the way to the end of `Pat`'s span, so it included the closing paren. I think the new approach is more robust anyway, since all we care to remove (besides the `_`) is the `:`, so we search just for that. ~This does leave one extra whitespace in one of the test cases, but I'd say let rustfmt handle that.~ fixed in the third commit changelog: [`let_with_type_underscore`]: don't eat closing paren in `let (i): _ = 0;` fixes https://github.com/rust-lang/rust-clippy/issues/15377
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
