diff options
| author | bors <bors@rust-lang.org> | 2023-05-18 05:11:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-18 05:11:52 +0000 |
| commit | 815a07e667d3b0ce8d59983c181cbdbb505fab98 (patch) | |
| tree | c70d6191e85d11b12a3a0e831ed6a5c41ab2ea12 /tests/rustdoc-js-std/parser-errors.js | |
| parent | cf182b9f4327194e9636a2ec8ddb1d246815a162 (diff) | |
| parent | f0be0ee1aa5314f6c7bb6949a8afe19e84ead35a (diff) | |
| download | rust-815a07e667d3b0ce8d59983c181cbdbb505fab98.tar.gz rust-815a07e667d3b0ce8d59983c181cbdbb505fab98.zip | |
Auto merge of #10725 - y21:issue9914, r=Jarcho
don't remove `dbg!` in arbitrary expressions Fixes #9914 The `dbg_macro` lint replaces empty `dbg!` invocations with the empty string in its suggestion, which is not always valid code in certain contexts (e.g. `let _ = dbg!();` becomes `let _ = ;`). This PR changes it to `()`, which should always be valid where `dbg!()` is valid (`dbg!()` with no arguments evaluates to `()`). It also special-cases "standalone" `dbg!();` expression statements, where it will suggest removing the whole statement entirely like it did before. changelog: [`dbg_macro`]: don't remove `dbg!()` in arbitrary expressions as it sometimes results in syntax errors
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions
