diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-01-27 14:41:09 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-01-27 16:41:49 -0800 |
| commit | a2a3074fb3ae6c1e7f0ccb6b111f3e16f9312f8f (patch) | |
| tree | 50ee89fae80b4f34af743050c29a128f978be283 /src/test/incremental/thinlto | |
| parent | 154c202afb256c379b7d454ec0244da69eaa2ced (diff) | |
| parent | b8669dff556a03ca37b39cbb81be65c94d24defe (diff) | |
| download | rust-a2a3074fb3ae6c1e7f0ccb6b111f3e16f9312f8f.tar.gz rust-a2a3074fb3ae6c1e7f0ccb6b111f3e16f9312f8f.zip | |
Rollup merge of #38617 - pnkfelix:double-reference, r=pnkfelix
Detect double reference when applying binary op
``` rust
let vr = v.iter().filter(|x| {
x % 2 == 0
});
```
will now yield the following compiler output:
``` bash
ERROR binary operation `%` cannot be applied to type `&&_`
NOTE this is a reference of a reference to a type that `%` can be applied to,
you need to dereference this variable once for this operation to work
NOTE an implementation of `std::ops::Rem` might be missing for `&&_`
```
The first NOTE is new.
Fix #33877
----
Thanks to @estebank for providing the original PR #34420 (of which this is a tweaked rebase).
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
