rust/tests/ui/mut_from_ref.stderr

64 lines
1.8 KiB
Text
Raw Normal View History

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