]> git.lizzy.rs Git - rust.git/blob - tests/ui/mut_reference.stderr
rustup and compile-fail -> ui test move
[rust.git] / tests / ui / mut_reference.stderr
1 error: The function/method "takes_an_immutable_reference" doesn't need a mutable reference
2   --> $DIR/mut_reference.rs:22:34
3    |
4 22 |     takes_an_immutable_reference(&mut 42); //~ERROR The function/method "takes_an_immutable_reference" doesn't need a mutable reference
5    |                                  ^^^^^^^
6    |
7 note: lint level defined here
8   --> $DIR/mut_reference.rs:19:8
9    |
10 19 | #[deny(unnecessary_mut_passed)]
11    |        ^^^^^^^^^^^^^^^^^^^^^^
12
13 error: The function/method "as_ptr" doesn't need a mutable reference
14   --> $DIR/mut_reference.rs:24:12
15    |
16 24 |     as_ptr(&mut 42); //~ERROR The function/method "as_ptr" doesn't need a mutable reference
17    |            ^^^^^^^
18
19 error: The function/method "takes_an_immutable_reference" doesn't need a mutable reference
20   --> $DIR/mut_reference.rs:28:44
21    |
22 28 |     my_struct.takes_an_immutable_reference(&mut 42); //~ERROR The function/method "takes_an_immutable_reference" doesn't need a mutable reference
23    |                                            ^^^^^^^
24
25 error: aborting due to 3 previous errors
26