1 error[E0308]: mismatched types
2 --> $DIR/sugg-else-for-closure.rs:6:26
4 LL | let _s = y.unwrap_or(|| x.split('.').nth(1).unwrap());
5 | --------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found closure
7 | arguments to this function are incorrect
9 = note: expected reference `&str`
10 found closure `[closure@$DIR/sugg-else-for-closure.rs:6:26: 6:28]`
11 note: associated function defined here
12 --> $SRC_DIR/core/src/option.rs:LL:COL
14 LL | pub const fn unwrap_or(self, default: T) -> T
16 help: try calling `unwrap_or_else` instead
18 LL | let _s = y.unwrap_or_else(|| x.split('.').nth(1).unwrap());
21 error: aborting due to previous error
23 For more information about this error, try `rustc --explain E0308`.