rust/compiler/rustc_parse/src/parser
Esteban Küber 37d2ea2fa0 Properly handle async blocks and fns in if exprs without else
When encountering a tail expression in the then arm of an `if` expression
without an `else` arm, account for `async fn` and `async` blocks to
suggest `return`ing the value and pointing at the return type of the
`async fn`.

We now also account for AFIT when looking for the return type to point at.

Fix #115405.
2024-02-12 20:26:34 +00:00
..
attr.rs Stop using String for error codes. 2024-01-29 07:41:41 +11:00
attr_wrapper.rs Rename Parser::span_diagnostic as Parser::dcx. 2023-12-18 16:06:21 +11:00
diagnostics.rs Properly handle async blocks and fns in if exprs without else 2024-02-12 20:26:34 +00:00
expr.rs Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
generics.rs Remove unnecessary .to_string()/.as_str()s 2024-02-02 15:16:05 -08:00
item.rs Remove unnecessary .to_string()/.as_str()s 2024-02-02 15:16:05 -08:00
mod.rs Handle methodcalls & operators in patterns 2024-01-28 16:12:21 +01:00
nonterminal.rs Use .into_diagnostic() less. 2023-12-18 20:46:13 +11:00
pat.rs Rollup merge of #120460 - nnethercote:fix-120397, r=compiler-errors 2024-01-30 11:19:19 +01:00
path.rs Rename consuming chaining methods on DiagnosticBuilder. 2024-01-10 07:40:00 +11:00
stmt.rs Suggest wrapping mac args in parens rather than the whole expression 2024-01-18 00:01:13 +00:00
ty.rs Lower anonymous structs or unions to HIR 2024-02-12 12:47:23 +08:00