about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-06-17 16:54:07 +0000
committerbors <bors@rust-lang.org>2017-06-17 16:54:07 +0000
commit78d8416caf65cfb50de61bb9423e9efa026bd45a (patch)
tree82670dd65a81e38fc5b5a9da7f4ef010fb4b77f3 /src/test/run-pass/thinlto
parentdfb8c80e118a6844e3a7130a884e92dde4ef4694 (diff)
parentda78b4d88e1ba4598428a92a6c8d5f9c399fede0 (diff)
downloadrust-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/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions