-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
A-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bug
Description
rust-analyzer version: rust-analyzer 1.90.0-nightly (9748d87 2025-07-21)
rustc version: rustc 1.90.0-nightly (9748d87 2025-07-21)
editor or extension: VIM-9.1 coc-rust-analyzer
code snippet to reproduce:
This code cannot applicable Convert match to let-else
fn main() {
let _x$0 = match 2 {
it @ 0..5 => it,
_ => {
return; // not in tail_expr
},
};
}
But tailexpr can applicable
fn main() {
let _x$0 = match 2 {
it @ 0..5 => it,
_ => {
return // is tail_expr
},
};
}
Should type_of_expr
handle the never type of non tailexpr in BlockExpr
Metadata
Metadata
Assignees
Labels
A-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bug