2017-02-12 14:10:25 +00:00
|
|
|
error: mutable borrow from immutable input(s)
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:19:39
|
|
|
|
|
|
|
|
|
19 | fn this_wont_hurt_a_bit(&self) -> &mut Foo {
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::mut-from-ref` implied by `-D warnings`
|
2017-02-12 14:10:25 +00:00
|
|
|
note: immutable borrow here
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:19:29
|
|
|
|
|
|
|
|
|
19 | fn this_wont_hurt_a_bit(&self) -> &mut Foo {
|
|
|
|
| ^^^^^
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
error: mutable borrow from immutable input(s)
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:25:25
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
25 | fn ouch(x: &Foo) -> &mut Foo;
|
2017-02-12 14:10:25 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: immutable borrow here
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:25:16
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
25 | fn ouch(x: &Foo) -> &mut Foo;
|
2017-02-12 14:10:25 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: mutable borrow from immutable input(s)
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:34:21
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
34 | fn fail(x: &u32) -> &mut u16 {
|
2017-02-12 14:10:25 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: immutable borrow here
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:34:12
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
34 | fn fail(x: &u32) -> &mut u16 {
|
2017-02-12 14:10:25 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: mutable borrow from immutable input(s)
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:38:50
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
38 | fn fail_lifetime<'a>(x: &'a u32, y: &mut u32) -> &'a mut u32 {
|
2017-02-12 14:10:25 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: immutable borrow here
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:38:25
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
38 | fn fail_lifetime<'a>(x: &'a u32, y: &mut u32) -> &'a mut u32 {
|
2017-02-12 14:10:25 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: mutable borrow from immutable input(s)
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:42:67
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
42 | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 {
|
2017-02-12 14:10:25 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: immutable borrow here
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:42:27
|
2017-02-10 23:32:12 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
42 | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 {
|
2017-02-12 14:10:25 +00:00
|
|
|
| ^^^^^^^ ^^^^^^^
|
2017-02-10 18:39:03 +00:00
|
|
|
|
2018-01-16 16:06:27 +00:00
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|