]> git.lizzy.rs Git - rust.git/blob - tests/ui/unit_cmp.stderr
Add check for assert_eq macros to unit_cmp lint
[rust.git] / tests / ui / unit_cmp.stderr
1 error: ==-comparison of unit values detected. This will always be true
2   --> $DIR/unit_cmp.rs:12:8
3    |
4 LL |       if {
5    |  ________^
6 LL | |         true;
7 LL | |     } == {
8 LL | |         false;
9 LL | |     } {}
10    | |_____^
11    |
12    = note: `-D clippy::unit-cmp` implied by `-D warnings`
13
14 error: >-comparison of unit values detected. This will always be false
15   --> $DIR/unit_cmp.rs:18:8
16    |
17 LL |       if {
18    |  ________^
19 LL | |         true;
20 LL | |     } > {
21 LL | |         false;
22 LL | |     } {}
23    | |_____^
24
25 error: assert_eq of unit values detected. This will always succeed
26   --> $DIR/unit_cmp.rs:24:5
27    |
28 LL |     assert_eq!((), ());
29    |     ^^^^^^^^^^^^^^^^^^^
30    |
31    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
32
33 error: debug_assert_eq of unit values detected. This will always succeed
34   --> $DIR/unit_cmp.rs:25:5
35    |
36 LL |     debug_assert_eq!((), ());
37    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
38    |
39    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
40
41 error: assert_ne of unit values detected. This will always fail
42   --> $DIR/unit_cmp.rs:27:5
43    |
44 LL |     assert_ne!((), ());
45    |     ^^^^^^^^^^^^^^^^^^^
46    |
47    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
48
49 error: debug_assert_ne of unit values detected. This will always fail
50   --> $DIR/unit_cmp.rs:28:5
51    |
52 LL |     debug_assert_ne!((), ());
53    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
54    |
55    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
56
57 error: aborting due to 6 previous errors
58