summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unit_hash.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/unit_hash.rs')
-rw-r--r--src/tools/clippy/tests/ui/unit_hash.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/unit_hash.rs b/src/tools/clippy/tests/ui/unit_hash.rs
index 43eb54eff..f3636d164 100644
--- a/src/tools/clippy/tests/ui/unit_hash.rs
+++ b/src/tools/clippy/tests/ui/unit_hash.rs
@@ -17,12 +17,18 @@ fn main() {
match my_enum {
Foo::Empty => ().hash(&mut state),
+ //~^ ERROR: this call to `hash` on the unit type will do nothing
+ //~| NOTE: the implementation of `Hash` for `()` is a no-op
Foo::WithValue(x) => x.hash(&mut state),
}
let res = ();
res.hash(&mut state);
+ //~^ ERROR: this call to `hash` on the unit type will do nothing
+ //~| NOTE: the implementation of `Hash` for `()` is a no-op
#[allow(clippy::unit_arg)]
do_nothing().hash(&mut state);
+ //~^ ERROR: this call to `hash` on the unit type will do nothing
+ //~| NOTE: the implementation of `Hash` for `()` is a no-op
}