Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fec3eb6

Browse files
committedJun 13, 2024
Auto merge of rust-lang#126438 - matthiaskrgr:rollup-tnqxfna, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - rust-lang#121216 (Always emit `native-static-libs` note, even if it is empty) - rust-lang#123962 (change method resolution to constrain hidden types instead of rejecting method candidates) - rust-lang#126285 (`UniqueRc`: support allocators and `T: ?Sized`.) - rust-lang#126315 (Add pub struct with allow(dead_code) into worklist) - rust-lang#126320 (Avoid ICES after reporting errors on erroneous patterns) - rust-lang#126343 (Remove some msys2 utils) - rust-lang#126351 (std::unix::fs::link using direct linkat call for Solaris.) - rust-lang#126399 (extend the check for LLVM build) - rust-lang#126436 (Reduce rustdoc GUI tests flakyness) r? `@ghost` `@rustbot` modify labels: rollup
2 parents f158600 + 6483e65 commit fec3eb6

File tree

66 files changed

+1300
-309
lines changed

Some content is hidden

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

66 files changed

+1300
-309
lines changed
 

‎compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
15781578
// type of the place it is referencing, and not some
15791579
// supertype thereof.
15801580
let init_ty = self.check_expr_with_needs(init, Needs::maybe_mut_place(m));
1581-
if let Some(mut diag) = self.demand_eqtype_diag(init.span, local_ty, init_ty) {
1581+
if let Err(mut diag) = self.demand_eqtype_diag(init.span, local_ty, init_ty) {
15821582
self.emit_type_mismatch_suggestions(
15831583
&mut diag,
15841584
init.peel_drop_temps(),
@@ -1624,7 +1624,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
16241624
let previous_diverges = self.diverges.get();
16251625
let else_ty = self.check_block_with_expected(blk, NoExpectation);
16261626
let cause = self.cause(blk.span, ObligationCauseCode::LetElse);
1627-
if let Some(err) = self.demand_eqtype_with_origin(&cause, self.tcx.types.never, else_ty)
1627+
if let Err(err) = self.demand_eqtype_with_origin(&cause, self.tcx.types.never, else_ty)
16281628
{
16291629
err.emit();
16301630
}

‎compiler/rustc_hir_typeck/src/method/confirm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
497497
args,
498498
})),
499499
);
500-
match self.at(&cause, self.param_env).sup(DefineOpaqueTypes::No, method_self_ty, self_ty) {
500+
match self.at(&cause, self.param_env).sup(DefineOpaqueTypes::Yes, method_self_ty, self_ty) {
501501
Ok(InferOk { obligations, value: () }) => {
502502
self.register_predicates(obligations);
503503
}
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.