]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/sugg-else-for-closure.fixed
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / suggestions / sugg-else-for-closure.fixed
1 // run-rustfix
2
3 fn main() {
4     let x = "com.example.app";
5     let y: Option<&str> = None;
6     let _s = y.unwrap_or_else(|| x.split('.').nth(1).unwrap());
7     //~^ ERROR: mismatched types [E0308]
8 }