1error[E0308]: mismatched types 2 --> $DIR/closure-return-type-mismatch.rs:7:9 3 | 4LL | a 5 | ^ expected `&str`, found `bool` 6 | 7note: return type inferred to be `&str` here 8 --> $DIR/closure-return-type-mismatch.rs:4:20 9 | 10LL | return "test"; 11 | ^^^^^^ 12 13error[E0308]: mismatched types 14 --> $DIR/closure-return-type-mismatch.rs:12:20 15 | 16LL | return "hello" 17 | ^^^^^^^ expected `bool`, found `&str` 18 19error: aborting due to 2 previous errors 20 21For more information about this error, try `rustc --explain E0308`. 22