Skip to content

Commit 3db2c3b

Browse files
committedJan 5, 2024
Auto merge of rust-lang#119630 - matthiaskrgr:rollup-oymvjkn, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#118680 (Add support for shell argfiles) - rust-lang#119151 (Hide foreign `#[doc(hidden)]` paths in import suggestions) - rust-lang#119350 (Imply outlives-bounds on lazy type aliases) - rust-lang#119354 (Make `negative_bounds` internal & fix some of its issues) - rust-lang#119506 (Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error`) - rust-lang#119554 (Fix scoping for let chains in match guards) - rust-lang#119563 (Check yield terminator's resume type in borrowck) - rust-lang#119589 (cstore: Remove unnecessary locking from `CrateMetadata`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 11035f9 + b4a7f1e commit 3db2c3b

File tree

98 files changed

+1374
-626
lines changed

Some content is hidden

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

98 files changed

+1374
-626
lines changed
 

‎Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -3738,6 +3738,7 @@ dependencies = [
37383738
"rustc_trait_selection",
37393739
"rustc_ty_utils",
37403740
"serde_json",
3741+
"shlex",
37413742
"time",
37423743
"tracing",
37433744
"windows",

‎compiler/rustc_ast_lowering/src/expr.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -546,20 +546,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
546546

547547
fn lower_arm(&mut self, arm: &Arm) -> hir::Arm<'hir> {
548548
let pat = self.lower_pat(&arm.pat);
549-
let guard = arm.guard.as_ref().map(|cond| {
550-
if let ExprKind::Let(pat, scrutinee, span, is_recovered) = &cond.kind {
551-
hir::Guard::IfLet(self.arena.alloc(hir::Let {
552-
hir_id: self.next_id(),
553-
span: self.lower_span(*span),
554-
pat: self.lower_pat(pat),
555-
ty: None,
556-
init: self.lower_expr(scrutinee),
557-
is_recovered: *is_recovered,
558-
}))
559-
} else {
560-
hir::Guard::If(self.lower_expr(cond))
561-
}
562-
});
549+
let guard = arm.guard.as_ref().map(|cond| self.lower_expr(cond));
563550
let hir_id = self.next_id();
564551
let span = self.lower_span(arm.span);
565552
self.lower_attrs(hir_id, &arm.attrs);

0 commit comments

Comments
 (0)