Use new try impl for ? operator

This commit is contained in:
Sam Mohr 2024-12-05 02:13:08 -08:00
parent 193c23bac8
commit de626102c8
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
20 changed files with 429 additions and 110 deletions

View file

@ -201,7 +201,7 @@ impl<'a> Formattable for Expr<'a> {
buf.indent(indent);
buf.push_str("try");
}
LowLevelTry(_) => unreachable!(
LowLevelTry(_, _) => unreachable!(
"LowLevelTry should only exist after desugaring, not during formatting"
),
Return(return_value, after_return) => {
@ -370,7 +370,7 @@ pub fn expr_is_multiline(me: &Expr<'_>, comments_only: bool) -> bool {
| Expr::Crash
| Expr::Dbg
| Expr::Try => false,
Expr::LowLevelTry(_) => {
Expr::LowLevelTry(_, _) => {
unreachable!("LowLevelTry should only exist after desugaring, not during formatting")
}