error[E0308]: mismatched types
  --> $DIR/closure-ty-mismatch-issue-128561.rs:2:32
   |
LL |     b"abc".iter().for_each(|x| x);
   |                                ^ expected `()`, found `&u8`
   |
help: consider ignoring the value
   |
LL |     b"abc".iter().for_each(|x| _ = x);
   |                                +++

error[E0308]: mismatched types
  --> $DIR/closure-ty-mismatch-issue-128561.rs:4:32
   |
LL |     b"abc".iter().for_each(|x| dbg!(x));
   |                                ^^^^^^^ expected `()`, found `&u8`

error[E0308]: mismatched types
  --> $DIR/closure-ty-mismatch-issue-128561.rs:8:9
   |
LL |         x
   |         ^ expected `()`, found `&u8`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0308`.
