fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB28 linesraw
1error: this call to `hash` on the unit type will do nothing
2  --> $DIR/unit_hash.rs:19:23
3   |
4LL |         Foo::Empty => ().hash(&mut state),
5   |                       ^^^^^^^^^^^^^^^^^^^ help: remove the call to `hash` or consider using: `0_u8.hash(&mut state)`
6   |
7   = note: the implementation of `Hash` for `()` is a no-op
8   = note: `-D clippy::unit-hash` implied by `-D warnings`
9   = help: to override `-D warnings` add `#[allow(clippy::unit_hash)]`
10
11error: this call to `hash` on the unit type will do nothing
12  --> $DIR/unit_hash.rs:26:5
13   |
14LL |     res.hash(&mut state);
15   |     ^^^^^^^^^^^^^^^^^^^^ help: remove the call to `hash` or consider using: `0_u8.hash(&mut state)`
16   |
17   = note: the implementation of `Hash` for `()` is a no-op
18
19error: this call to `hash` on the unit type will do nothing
20  --> $DIR/unit_hash.rs:31:5
21   |
22LL |     do_nothing().hash(&mut state);
23   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `hash` or consider using: `0_u8.hash(&mut state)`
24   |
25   = note: the implementation of `Hash` for `()` is a no-op
26
27error: aborting due to 3 previous errors
28