rust/tests/ui/mut_from_ref.stderr
2017-02-11 01:41:49 +01:00

33 lines
972 B
Plaintext

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