2019-07-07 08:16:58 -05:00
|
|
|
error[E0596]: cannot borrow data in an index of `std::collections::HashMap<&str, std::string::String>` as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/index-mut-help.rs:11:5
|
2018-08-07 16:09:08 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | map["peter"].clear();
|
2018-08-07 16:09:08 -05:00
|
|
|
| ^^^^^^^^^^^^ cannot borrow as mutable
|
|
|
|
|
|
|
|
|
= help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>`
|
|
|
|
|
2019-07-07 08:16:58 -05:00
|
|
|
error[E0594]: cannot assign to data in an index of `std::collections::HashMap<&str, std::string::String>`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/index-mut-help.rs:12:5
|
2018-08-07 16:09:08 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | map["peter"] = "0".to_string();
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^^^^^^^^^^^ cannot assign
|
2019-07-07 08:16:58 -05:00
|
|
|
|
|
|
|
|
= help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>`
|
2018-08-07 16:09:08 -05:00
|
|
|
|
2019-07-07 08:16:58 -05:00
|
|
|
error[E0596]: cannot borrow data in an index of `std::collections::HashMap<&str, std::string::String>` as mutable
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/index-mut-help.rs:13:13
|
2018-08-07 16:09:08 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let _ = &mut map["peter"];
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^ cannot borrow as mutable
|
2018-08-07 16:09:08 -05:00
|
|
|
|
|
|
|
|
= help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
For more information about this error, try `rustc --explain E0596`.
|