|
| 1 | +error[E0412]: cannot find type `Item` in this scope |
| 2 | + --> $DIR/sugg-swap-equality-in-macro-issue-139050.rs:28:5 |
| 3 | + | |
| 4 | +LL | Item: Eq + Debug, |
| 5 | + | ^^^^ not found in this scope |
| 6 | + |
| 7 | +error[E0308]: mismatched types |
| 8 | + --> $DIR/sugg-swap-equality-in-macro-issue-139050.rs:30:5 |
| 9 | + | |
| 10 | +LL | ext::eq!(assert iter.next(), Some(value)); |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<<I as Iterator>::Item>`, found `Option<&<I as Iterator>::Item>` |
| 12 | + | |
| 13 | + = note: expected enum `Option<_>` |
| 14 | + found enum `Option<&_>` |
| 15 | + = note: `Option<&<I as Iterator>::Item>` implements `PartialEq<Option<<I as Iterator>::Item>>` |
| 16 | + = note: this error originates in the macro `ext::eq` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 17 | +help: consider swapping the equality |
| 18 | + --> $DIR/auxiliary/extern-macro-issue-139050.rs:6:22 |
| 19 | + | |
| 20 | +LL - if !(*left_val == *right_val) { |
| 21 | +LL + if !(*right_val == *left_val) { |
| 22 | + | |
| 23 | + |
| 24 | +error[E0308]: mismatched types |
| 25 | + --> $DIR/sugg-swap-equality-in-macro-issue-139050.rs:15:35 |
| 26 | + | |
| 27 | +LL | if !(*left_val == *right_val) { |
| 28 | + | ^^^^^^^^^^ expected `Option<<I as Iterator>::Item>`, found `Option<&<I as Iterator>::Item>` |
| 29 | +... |
| 30 | +LL | eq_local!(assert iter.next(), Some(value)); |
| 31 | + | ------------------------------------------ in this macro invocation |
| 32 | + | |
| 33 | + = note: expected enum `Option<_>` |
| 34 | + found enum `Option<&_>` |
| 35 | + = note: `Option<&<I as Iterator>::Item>` implements `PartialEq<Option<<I as Iterator>::Item>>` |
| 36 | + = note: this error originates in the macro `eq_local` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 37 | +help: consider swapping the equality |
| 38 | + | |
| 39 | +LL - if !(*left_val == *right_val) { |
| 40 | +LL + if !(*right_val == *left_val) { |
| 41 | + | |
| 42 | + |
| 43 | +error: aborting due to 3 previous errors |
| 44 | + |
| 45 | +Some errors have detailed explanations: E0308, E0412. |
| 46 | +For more information about an error, try `rustc --explain E0308`. |
0 commit comments