2022-07-15 11:53:23 -05:00
|
|
|
// Issue #94176: wrong span for the error message of a mismatched type error,
|
|
|
|
// if the function uses a `let else` construct.
|
2022-02-27 00:08:31 -06:00
|
|
|
|
2022-07-15 11:53:23 -05:00
|
|
|
|
|
|
|
pub fn test(a: Option<u32>) -> Option<u32> { //~ ERROR mismatched types
|
|
|
|
let Some(_) = a else { return None; };
|
|
|
|
println!("Foo");
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|