]>
Commit | Line | Data |
---|---|---|
dc9dc135 XL |
1 | fn suggestion(opt: &mut Option<String>) { |
2 | opt = None; //~ ERROR mismatched types | |
3 | } | |
4 | ||
5 | fn no_suggestion(opt: &mut Result<String, ()>) { | |
6 | opt = None //~ ERROR mismatched types | |
7 | } | |
8 | ||
9 | fn suggestion2(opt: &mut Option<String>) { | |
10 | opt = Some(String::new())//~ ERROR mismatched types | |
11 | } | |
12 | ||
13 | fn no_suggestion2(opt: &mut Option<String>) { | |
14 | opt = Some(42)//~ ERROR mismatched types | |
15 | } | |
16 | ||
17 | fn main() {} |