mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
11 lines
280 B
Rust
11 lines
280 B
Rust
// Issue #94176: wrong span for the error message of a mismatched type error,
|
|
// if the function uses a `let else` construct.
|
|
|
|
|
|
pub fn test(a: Option<u32>) -> Option<u32> { //~ ERROR mismatched types
|
|
let Some(_) = a else { return None; };
|
|
println!("Foo");
|
|
}
|
|
|
|
fn main() {}
|