about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-10-28 13:58:16 +0000
committerbors <bors@rust-lang.org>2024-10-28 13:58:16 +0000
commit2e4a11ea776a33417945b485aee39c28c1509af2 (patch)
tree37b236c0c63069e0fc8c8c75217c791cdb6b130e /compiler/rustc_codegen_llvm/src
parenta529c44ecadfaa6cfb60f1301bbf01e27941048f (diff)
parentd30a026a6b7cc9f64dbec7ba09d27c571ed23c4e (diff)
downloadrust-2e4a11ea776a33417945b485aee39c28c1509af2.tar.gz
rust-2e4a11ea776a33417945b485aee39c28c1509af2.zip
Auto merge of #13338 - CoCo-Japan-pan:nonminimal_bool_casted, r=Centri3
fix incorrect suggestion for `!(a >= b) as i32 == c`

fixes #12761

The expression `!(a >= b) as i32 == c` got simplified to `a < b as i32 == c`, but this is a syntax error.
The result we want is `(a < b) as i32 == c`.
This is fixed by adding a parenthesis to the suggestion given in `check_simplify_not` when the boolean expression is casted.

changelog: [`nonminimal_bool`]: fix incorrect suggestion for `!(a >= b) as i32 == c`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions