blob: 66b78a1b140155c737bf78bb7b497f104ceb8b55 [file] [log] [blame]
error[E0308]: mismatched types
--> $DIR/mut-ref-reassignment.rs:2:11
|
LL | opt = None;
| ^^^^ expected mutable reference, found enum `std::option::Option`
|
= note: expected type `&mut std::option::Option<std::string::String>`
found type `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 type `&mut std::result::Result<std::string::String, ()>`
found type `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 type `&mut std::option::Option<std::string::String>`
found type `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 type `&mut std::option::Option<std::string::String>`
found type `std::option::Option<{integer}>`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0308`.