1 error: The function/method `takes_an_immutable_reference` doesn't need a mutable reference
2 --> mut_reference.rs:22:34
4 22 | takes_an_immutable_reference(&mut 42);
7 = note: `-D unnecessary-mut-passed` implied by `-D warnings`
9 error: The function/method `as_ptr` doesn't need a mutable reference
10 --> mut_reference.rs:24:12
15 = note: `-D unnecessary-mut-passed` implied by `-D warnings`
17 error: The function/method `takes_an_immutable_reference` doesn't need a mutable reference
18 --> mut_reference.rs:28:44
20 28 | my_struct.takes_an_immutable_reference(&mut 42);
23 = note: `-D unnecessary-mut-passed` implied by `-D warnings`
25 error: aborting due to previous error(s)
27 error: Could not compile `clippy_tests`.
29 To learn more, run the command again with --verbose.