about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-06-13 16:26:20 -0700
committerEsteban Küber <esteban@kuber.com.ar>2017-06-14 22:09:32 -0700
commit028b5f94e3aef435c626131e5b571272f2d3d52c (patch)
treea73fb4260dc9acafd5ed2ecfa74c57394123ac2e /src/rustllvm/PassWrapper.cpp
parent554c685b0b3b25b7aa752717edf50b8d6bcab7a0 (diff)
downloadrust-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