Skip to content

Commit 76fb0e3

Browse files
committed
Auto merge of #112755 - matthiaskrgr:rollup-e4bhbgn, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #107200 (io: soften ‘at most one write attempt’ requirement in io::Write::write) - #112667 (Move WF/ConstEvaluatable goal to clause) - #112685 (std: only depend on dlmalloc for wasm*-unknown) - #112722 (bootstrap: check for dry run when copying env vars for msvc) - #112734 (Make `Bound::predicates` use `Clause`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0c2c243 + 3436069 commit 76fb0e3

File tree

45 files changed

+784
-716
lines changed

Some content is hidden

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

45 files changed

+784
-716
lines changed

compiler/rustc_borrowck/src/region_infer/opaque_types.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ fn check_opaque_type_well_formed<'tcx>(
330330
// Require the hidden type to be well-formed with only the generics of the opaque type.
331331
// Defining use functions may have more bounds than the opaque type, which is ok, as long as the
332332
// hidden type is well formed even without those bounds.
333-
let predicate = ty::Binder::dummy(ty::PredicateKind::WellFormed(definition_ty.into()));
333+
let predicate =
334+
ty::Binder::dummy(ty::PredicateKind::Clause(ty::Clause::WellFormed(definition_ty.into())));
334335
ocx.register_obligation(Obligation::misc(tcx, definition_span, def_id, param_env, predicate));
335336

336337
// Check that all obligations are satisfied by the implementation's

compiler/rustc_borrowck/src/type_check/mod.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1419,9 +1419,11 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
14191419
//
14201420
// See #91068 for an example.
14211421
self.prove_predicates(
1422-
sig.inputs_and_output
1423-
.iter()
1424-
.map(|ty| ty::Binder::dummy(ty::PredicateKind::WellFormed(ty.into()))),
1422+
sig.inputs_and_output.iter().map(|ty| {
1423+
ty::Binder::dummy(ty::PredicateKind::Clause(ty::Clause::WellFormed(
1424+
ty.into(),
1425+
)))
1426+
}),
14251427
term_location.to_locations(),
14261428
ConstraintCategory::Boring,
14271429
);
@@ -1850,7 +1852,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
18501852

18511853
let array_ty = rvalue.ty(body.local_decls(), tcx);
18521854
self.prove_predicate(
1853-
ty::PredicateKind::WellFormed(array_ty.into()),
1855+
ty::PredicateKind::Clause(ty::Clause::WellFormed(array_ty.into())),
18541856
Locations::Single(location),
18551857
ConstraintCategory::Boring,
18561858
);

0 commit comments

Comments
 (0)