2017-02-12 14:10:25 +00:00
|
|
|
error: mutable borrow from immutable input(s)
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:9:39
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
|
9 | fn this_wont_hurt_a_bit(&self) -> &mut Foo {
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
= note: `-D mut-from-ref` implied by `-D warnings`
|
2017-02-12 14:10:25 +00:00
|
|
|
note: immutable borrow here
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:9:29
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
|
9 | fn this_wont_hurt_a_bit(&self) -> &mut Foo {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: mutable borrow from immutable input(s)
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:15:25
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
|
15 | fn ouch(x: &Foo) -> &mut Foo;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: immutable borrow here
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:15:16
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
|
15 | fn ouch(x: &Foo) -> &mut Foo;
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: mutable borrow from immutable input(s)
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:24:21
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
|
24 | fn fail(x: &u32) -> &mut u16 {
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: immutable borrow here
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:24:12
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
|
24 | fn fail(x: &u32) -> &mut u16 {
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: mutable borrow from immutable input(s)
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:28:50
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
|
28 | fn fail_lifetime<'a>(x: &'a u32, y: &mut u32) -> &'a mut u32 {
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: immutable borrow here
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:28:25
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
|
28 | fn fail_lifetime<'a>(x: &'a u32, y: &mut u32) -> &'a mut u32 {
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: mutable borrow from immutable input(s)
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:32:67
|
2017-02-12 14:10:25 +00:00
|
|
|
|
|
|
|
|
32 | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 {
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: immutable borrow here
|
2017-08-01 15:54:21 +00:00
|
|
|
--> $DIR/mut_from_ref.rs:32:27
|
2017-02-10 23:32:12 +00:00
|
|
|
|
|
2017-02-12 14:10:25 +00:00
|
|
|
32 | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 {
|
|
|
|
| ^^^^^^^ ^^^^^^^
|
2017-02-10 18:39:03 +00:00
|
|
|
|
2017-07-03 04:37:30 +00:00
|
|
|
error: aborting due to 5 previous errors
|
2017-02-11 00:41:49 +00:00
|
|
|
|