| error[E0308]: mismatched types |
| --> $DIR/mut-ref-reassignment.rs:2:11 |
| | |
| LL | opt = None; |
| | ^^^^ expected mutable reference, found enum `std::option::Option` |
| | |
| = note: expected mutable reference `&mut std::option::Option<std::string::String>` |
| found enum `std::option::Option<_>` |
| help: consider dereferencing here to assign to the mutable borrowed piece of memory |
| | |
| LL | *opt = None; |
| | ^^^^ |
| |
| error[E0308]: mismatched types |
| --> $DIR/mut-ref-reassignment.rs:6:11 |
| | |
| LL | opt = None |
| | ^^^^ expected mutable reference, found enum `std::option::Option` |
| | |
| = note: expected mutable reference `&mut std::result::Result<std::string::String, ()>` |
| found enum `std::option::Option<_>` |
| |
| error[E0308]: mismatched types |
| --> $DIR/mut-ref-reassignment.rs:10:11 |
| | |
| LL | opt = Some(String::new()) |
| | ^^^^^^^^^^^^^^^^^^^ expected mutable reference, found enum `std::option::Option` |
| | |
| = note: expected mutable reference `&mut std::option::Option<std::string::String>` |
| found enum `std::option::Option<std::string::String>` |
| help: consider dereferencing here to assign to the mutable borrowed piece of memory |
| | |
| LL | *opt = Some(String::new()) |
| | ^^^^ |
| |
| error[E0308]: mismatched types |
| --> $DIR/mut-ref-reassignment.rs:14:11 |
| | |
| LL | opt = Some(42) |
| | ^^^^^^^^ expected mutable reference, found enum `std::option::Option` |
| | |
| = note: expected mutable reference `&mut std::option::Option<std::string::String>` |
| found enum `std::option::Option<{integer}>` |
| |
| error: aborting due to 4 previous errors |
| |
| For more information about this error, try `rustc --explain E0308`. |