forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathissue_113842.stderr
More file actions
31 lines (28 loc) · 1.07 KB
/
Copy pathissue_113842.stderr
File metadata and controls
31 lines (28 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
error[E0596]: cannot borrow data in a `&` reference as mutable
--> $DIR/issue_113842.rs:17:24
|
LL | let _y: &mut Foo = &mut &foo;
| ^^^^^----
| |
| cannot borrow as mutable
|
help: this expression is of type `&Foo`, which is an immutable reference
--> $DIR/issue_113842.rs:17:29
|
LL | let _y: &mut Foo = &mut &foo;
| ^^^^
error[E0596]: cannot borrow data in a `&` reference as mutable
--> $DIR/issue_113842.rs:21:23
|
LL | some_library::foo(&mut some_library::bar());
| ^^^^^-------------------
| |
| cannot borrow as mutable
|
help: this expression is of type `&[i32]`, which is an immutable reference
--> $DIR/issue_113842.rs:21:28
|
LL | some_library::foo(&mut some_library::bar());
| ^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0596`.