rust/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr

47 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0596]: cannot borrow immutable borrowed content as mutable
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-borrow-overloaded-deref.rs:23:24
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | let __isize = &mut *x;
2018-08-08 07:28:26 -05:00
| ^^ cannot borrow as mutable
error[E0596]: cannot borrow immutable borrowed content as mutable
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-borrow-overloaded-deref.rs:27:24
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | let __isize = &mut *x;
2018-08-08 07:28:26 -05:00
| ^^ cannot borrow as mutable
error[E0596]: cannot borrow immutable borrowed content as mutable
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-borrow-overloaded-deref.rs:35:10
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | &mut **x
2018-08-08 07:28:26 -05:00
| ^^^ cannot borrow as mutable
error[E0596]: cannot borrow immutable borrowed content as mutable
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-borrow-overloaded-deref.rs:39:10
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | &mut **x
2018-08-08 07:28:26 -05:00
| ^^^ cannot borrow as mutable
error[E0594]: cannot assign to immutable borrowed content
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-borrow-overloaded-deref.rs:43:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | *x = 3;
2018-08-08 07:28:26 -05:00
| ^^^^^^ cannot borrow as mutable
error[E0594]: cannot assign to immutable borrowed content
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-borrow-overloaded-deref.rs:47:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | **x = 3;
2018-08-08 07:28:26 -05:00
| ^^^^^^^ cannot borrow as mutable
error[E0594]: cannot assign to immutable borrowed content
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-borrow-overloaded-deref.rs:51:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | **x = 3;
2018-08-08 07:28:26 -05:00
| ^^^^^^^ cannot borrow as mutable
error: aborting due to 7 previous errors
Some errors occurred: E0594, E0596.
For more information about an error, try `rustc --explain E0594`.