diff options
| author | bors <bors@rust-lang.org> | 2017-06-17 16:54:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-06-17 16:54:07 +0000 |
| commit | 78d8416caf65cfb50de61bb9423e9efa026bd45a (patch) | |
| tree | 82670dd65a81e38fc5b5a9da7f4ef010fb4b77f3 /src/rustllvm/PassWrapper.cpp | |
| parent | dfb8c80e118a6844e3a7130a884e92dde4ef4694 (diff) | |
| parent | da78b4d88e1ba4598428a92a6c8d5f9c399fede0 (diff) | |
| download | rust-78d8416caf65cfb50de61bb9423e9efa026bd45a.tar.gz rust-78d8416caf65cfb50de61bb9423e9efa026bd45a.zip | |
Auto merge of #42649 - estebank:if-cond, r=nikomatsakis
Report error for assignment in `if` condition
For code like `if x = 3 {}`, output:
```
error[E0308]: mismatched types
--> $DIR/issue-17283.rs:25:8
|
25 | if x = x {
| ^^^^^
| |
| help: did you mean to compare equality? `x == x`
| expected bool, found ()
|
= note: expected type `bool`
found type `()`
```
Fix #40926.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
