diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2017-06-13 16:26:20 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2017-06-14 22:09:32 -0700 |
| commit | 028b5f94e3aef435c626131e5b571272f2d3d52c (patch) | |
| tree | a73fb4260dc9acafd5ed2ecfa74c57394123ac2e /src/rustllvm/PassWrapper.cpp | |
| parent | 554c685b0b3b25b7aa752717edf50b8d6bcab7a0 (diff) | |
| download | rust-028b5f94e3aef435c626131e5b571272f2d3d52c.tar.gz rust-028b5f94e3aef435c626131e5b571272f2d3d52c.zip | |
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 `()`
```
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
