2017-02-10 17:32:12 -06:00
|
|
|
error: this function takes an immutable ref to return a mutable one
|
|
|
|
--> tests/ui/mut_from_ref.rs:9:39
|
2017-02-10 12:39:03 -06:00
|
|
|
|
|
|
|
|
9 | fn this_wont_hurt_a_bit(&self) -> &mut Foo {
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2017-02-10 17:32:12 -06:00
|
|
|
--> tests/ui/mut_from_ref.rs:4:9
|
2017-02-10 12:39:03 -06:00
|
|
|
|
|
|
|
|
4 | #![deny(mut_from_ref)]
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
2017-02-10 17:32:12 -06:00
|
|
|
error: this function takes an immutable ref to return a mutable one
|
|
|
|
--> tests/ui/mut_from_ref.rs:15:25
|
2017-02-10 12:39:03 -06:00
|
|
|
|
|
|
|
|
15 | fn ouch(x: &Foo) -> &mut Foo;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
2017-02-10 17:32:12 -06:00
|
|
|
error: this function takes an immutable ref to return a mutable one
|
|
|
|
--> tests/ui/mut_from_ref.rs:24:21
|
2017-02-10 12:39:03 -06:00
|
|
|
|
|
|
|
|
24 | fn fail(x: &u32) -> &mut u16 {
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
2017-02-10 17:32:12 -06:00
|
|
|
error: this function takes an immutable ref to return a mutable one
|
|
|
|
--> tests/ui/mut_from_ref.rs:28:50
|
|
|
|
|
|
|
|
|
28 | fn fail_lifetime<'a>(x: &'a u32, y: &mut u32) -> &'a mut u32 {
|
|
|
|
| ^^^^^^^^^^^
|
2017-02-10 12:39:03 -06:00
|
|
|
|
2017-02-10 17:32:12 -06:00
|
|
|
error: aborting due to 4 previous errors
|