]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/sugg-else-for-closure.fixed
Rollup merge of #106751 - clubby789:const-intrinsic, r=GuillaumeGomez
[rust.git] / tests / 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 }