1 2 3 4 5 6 7
fn foo(b: bool) -> Result<bool,String> { //~ ERROR mismatched types Err("bar".to_string()); } fn main() { foo(false); }