Closed
Description
fn change_opt(opt: &mut Option<String>){
opt = None
}
<anon>:2:11: 2:15 error: mismatched types:
expected `&mut core::option::Option<collections::string::String>`,
found `core::option::Option<_>`
(expected &-ptr,
found enum `core::option::Option`) [E0308]
<anon>:2 opt = None
^~~~
<anon>:2:11: 2:15 help: see the detailed explanation for E0308
error: aborting due to previous error
It'd be great if this had a hint:
Did you mean `*opt = None`
Someone on IRC just ran into this.