Skip to content

Commit 340bb19

Browse files
committedFeb 14, 2024
Auto merge of rust-lang#121078 - oli-obk:rollup-p11zsav, r=oli-obk
Rollup of 13 pull requests Successful merges: - rust-lang#116387 (Additional doc links and explanation of `Wake`.) - rust-lang#118738 (Netbsd10 update) - rust-lang#118890 (Clarify the lifetimes of allocations returned by the `Allocator` trait) - rust-lang#120498 (Uplift `TypeVisitableExt` into `rustc_type_ir`) - rust-lang#120530 (Be less confident when `dyn` suggestion is not checked for object safety) - rust-lang#120915 (Fix suggestion span for `?Sized` when param type has default) - rust-lang#121015 (Optimize `delayed_bug` handling.) - rust-lang#121024 (implement `Default` for `AsciiChar`) - rust-lang#121039 (Correctly compute adjustment casts in GVN) - rust-lang#121045 (Fix two UI tests with incorrect directive / invalid revision) - rust-lang#121049 (Do not point at `#[allow(_)]` as the reason for compat lint triggering) - rust-lang#121071 (Use fewer delayed bugs.) - rust-lang#121073 (Fix typos in `OneLock` doc) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 81b757c + 96635da commit 340bb19

File tree

93 files changed

+966
-589
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+966
-589
lines changed
 

‎compiler/rustc_ast_lowering/src/expr.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
323323
)
324324
}
325325
ExprKind::Yield(opt_expr) => self.lower_expr_yield(e.span, opt_expr.as_deref()),
326-
ExprKind::Err => {
327-
hir::ExprKind::Err(self.dcx().span_delayed_bug(e.span, "lowered ExprKind::Err"))
328-
}
326+
ExprKind::Err => hir::ExprKind::Err(self.dcx().has_errors().unwrap()),
329327
ExprKind::Try(sub_expr) => self.lower_expr_try(e.span, sub_expr),
330328

331329
ExprKind::Paren(_) | ExprKind::ForLoop { .. } => {

‎compiler/rustc_ast_lowering/src/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
10681068
fn lower_block_expr_opt(&mut self, span: Span, block: Option<&Block>) -> hir::Expr<'hir> {
10691069
match block {
10701070
Some(block) => self.lower_block_expr(block),
1071-
None => self.expr_err(span, self.dcx().span_delayed_bug(span, "no block")),
1071+
None => self.expr_err(span, self.dcx().has_errors().unwrap()),
10721072
}
10731073
}
10741074

0 commit comments

Comments
 (0)