1 error: mutable borrow from immutable input(s)
2 --> $DIR/mut_from_ref.rs:7:39
4 LL | fn this_wont_hurt_a_bit(&self) -> &mut Foo {
7 = note: `-D clippy::mut-from-ref` implied by `-D warnings`
8 note: immutable borrow here
9 --> $DIR/mut_from_ref.rs:7:29
11 LL | fn this_wont_hurt_a_bit(&self) -> &mut Foo {
14 error: mutable borrow from immutable input(s)
15 --> $DIR/mut_from_ref.rs:13:25
17 LL | fn ouch(x: &Foo) -> &mut Foo;
20 note: immutable borrow here
21 --> $DIR/mut_from_ref.rs:13:16
23 LL | fn ouch(x: &Foo) -> &mut Foo;
26 error: mutable borrow from immutable input(s)
27 --> $DIR/mut_from_ref.rs:22:21
29 LL | fn fail(x: &u32) -> &mut u16 {
32 note: immutable borrow here
33 --> $DIR/mut_from_ref.rs:22:12
35 LL | fn fail(x: &u32) -> &mut u16 {
38 error: mutable borrow from immutable input(s)
39 --> $DIR/mut_from_ref.rs:26:50
41 LL | fn fail_lifetime<'a>(x: &'a u32, y: &mut u32) -> &'a mut u32 {
44 note: immutable borrow here
45 --> $DIR/mut_from_ref.rs:26:25
47 LL | fn fail_lifetime<'a>(x: &'a u32, y: &mut u32) -> &'a mut u32 {
50 error: mutable borrow from immutable input(s)
51 --> $DIR/mut_from_ref.rs:30:67
53 LL | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 {
56 note: immutable borrow here
57 --> $DIR/mut_from_ref.rs:30:27
59 LL | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 {
62 error: mutable borrow from immutable input(s)
63 --> $DIR/mut_from_ref.rs:44:35
65 LL | unsafe fn also_broken(x: &u32) -> &mut u32 {
68 note: immutable borrow here
69 --> $DIR/mut_from_ref.rs:44:26
71 LL | unsafe fn also_broken(x: &u32) -> &mut u32 {
74 error: aborting due to 6 previous errors