about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-09-02 00:02:16 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-09-02 00:02:16 +0000
commitff60e5c3f3a00fcf03fc4d50432cd76f2a890a9f (patch)
tree8f277a9ecece22a5b40afc3f032598087f68345d /compiler/rustc_mir_transform/src
parentf5b5e67f0f512d30cc6a5dab0ed6cf55c3905db5 (diff)
downloadrust-ff60e5c3f3a00fcf03fc4d50432cd76f2a890a9f.tar.gz
rust-ff60e5c3f3a00fcf03fc4d50432cd76f2a890a9f.zip
Suggest parentheses around if-expressions
```
error[E0308]: mismatched types
  --> $DIR/expr-as-stmt-2.rs:15:15
   |
LL |     if true { true } else { false } && true;
   |     ----------^^^^-----------------
   |     |         |
   |     |         expected `()`, found `bool`
   |     expected this to be `()`
   |
help: parentheses are required to parse this as an expression
   |
LL |     (if true { true } else { false }) && true;
   |     +                               +
```
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions