Skip to content

Commit d2ad293

Browse files
committedJun 14, 2024
Auto merge of #126462 - matthiaskrgr:rollup-g0t1am4, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #123962 (change method resolution to constrain hidden types instead of rejecting method candidates) - #126244 (Update fuchsia commit, and SDK to 21.20240610.2.1) - #126270 (Migrate run make const fn mir) - #126320 (Avoid ICES after reporting errors on erroneous patterns) - #126449 (Fill out missing Windows support information) r? `@ghost` `@rustbot` modify labels: rollup
2 parents bfa098e + 7f52e7d commit d2ad293

File tree

64 files changed

+1183
-271
lines changed

Some content is hidden

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

64 files changed

+1183
-271
lines changed
 

‎compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,7 +2888,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
28882888
..
28892889
} = explanation
28902890
{
2891-
if let Some(diag) = self.try_report_cannot_return_reference_to_local(
2891+
if let Err(diag) = self.try_report_cannot_return_reference_to_local(
28922892
borrow,
28932893
borrow_span,
28942894
span,
@@ -3075,7 +3075,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
30753075
if let BorrowExplanation::MustBeValidFor { category, span, from_closure: false, .. } =
30763076
explanation
30773077
{
3078-
if let Some(diag) = self.try_report_cannot_return_reference_to_local(
3078+
if let Err(diag) = self.try_report_cannot_return_reference_to_local(
30793079
borrow,
30803080
proper_span,
30813081
span,
@@ -3237,11 +3237,11 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
32373237
return_span: Span,
32383238
category: ConstraintCategory<'tcx>,
32393239
opt_place_desc: Option<&String>,
3240-
) -> Option<Diag<'tcx>> {
3240+
) -> Result<(), Diag<'tcx>> {
32413241
let return_kind = match category {
32423242
ConstraintCategory::Return(_) => "return",
32433243
ConstraintCategory::Yield => "yield",
3244-
_ => return None,
3244+
_ => return Ok(()),
32453245
};
32463246

32473247
// FIXME use a better heuristic than Spans
@@ -3317,7 +3317,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
33173317
}
33183318
}
33193319

3320-
Some(err)
3320+
Err(err)
33213321
}
33223322

33233323
#[instrument(level = "debug", skip(self))]

‎compiler/rustc_hir_typeck/src/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
628628
return;
629629
};
630630

631-
let pick = self.confirm_method(
631+
let pick = self.confirm_method_for_diagnostic(
632632
call_expr.span,
633633
callee_expr,
634634
call_expr,

0 commit comments

Comments
 (0)