Auto merge of #138747 - matthiaskrgr:rollup-68x44rw, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #138435 (Add support for postfix yield expressions)
 - #138685 (Use `Option<Ident>` for lowered param names.)
 - #138700 (Suggest `-Whelp` when pass `--print lints` to rustc)
 - #138727 (Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType`)
 - #138729 (Clean up `FnCtxt::resolve_coroutine_interiors`)
 - #138731 (coverage: Add LLVM plumbing for expansion regions)
 - #138732 (Use `def_path_str` for def id arg in `UnsupportedOpInfo`)
 - #138735 (Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2025-03-20 22:35:15 +00:00
commit eda7820be5
62 changed files with 499 additions and 240 deletions

View file

@ -8,7 +8,7 @@ use rustc_ast::util::literal::escape_byte_str_symbol;
use rustc_ast::util::parser::{self, ExprPrecedence, Fixity};
use rustc_ast::{
self as ast, BlockCheckMode, FormatAlignment, FormatArgPosition, FormatArgsPiece, FormatCount,
FormatDebugHex, FormatSign, FormatTrait, token,
FormatDebugHex, FormatSign, FormatTrait, YieldKind, token,
};
use crate::pp::Breaks::Inconsistent;
@ -761,7 +761,7 @@ impl<'a> State<'a> {
self.print_expr(e, FixupContext::default());
self.pclose();
}
ast::ExprKind::Yield(e) => {
ast::ExprKind::Yield(YieldKind::Prefix(e)) => {
self.word("yield");
if let Some(expr) = e {
@ -773,6 +773,14 @@ impl<'a> State<'a> {
);
}
}
ast::ExprKind::Yield(YieldKind::Postfix(e)) => {
self.print_expr_cond_paren(
e,
e.precedence() < ExprPrecedence::Unambiguous,
fixup.leftmost_subexpression_with_dot(),
);
self.word(".yield");
}
ast::ExprKind::Try(e) => {
self.print_expr_cond_paren(
e,