diff options
| author | bors <bors@rust-lang.org> | 2022-06-14 10:51:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-14 10:51:16 +0000 |
| commit | edab34ab2abbafc16a78daedf71dbacd2eb0b7bf (patch) | |
| tree | 2d763273c835911f568f489ccc1c4cf8bb3b7195 /compiler/rustc_trait_selection/src/traits/project.rs | |
| parent | da895e7938e8d6f8d221fce2876d225bf58df865 (diff) | |
| parent | 27f78051ada9d1290a62ff34d9fe014ca940d4e9 (diff) | |
| download | rust-edab34ab2abbafc16a78daedf71dbacd2eb0b7bf.tar.gz rust-edab34ab2abbafc16a78daedf71dbacd2eb0b7bf.zip | |
Auto merge of #98091 - Dylan-DPC:rollup-ueb6b5x, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #97869 (BTree: tweak internal comments) - #97935 (Rename the `ConstS::val` field as `kind`.) - #97948 (lint: add diagnostic translation migration lints) - #98042 (Fix compat_fn option method on miri) - #98069 (rustdoc: remove link on slice brackets) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/project.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/project.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs index 7341ab0ab12..565f3f509db 100644 --- a/compiler/rustc_trait_selection/src/traits/project.rs +++ b/compiler/rustc_trait_selection/src/traits/project.rs @@ -742,7 +742,7 @@ impl<'tcx> TypeFolder<'tcx> for BoundVarReplacer<'_, 'tcx> { } fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> { - match ct.val() { + match ct.kind() { ty::ConstKind::Bound(debruijn, _) if debruijn.as_usize() + 1 > self.current_index.as_usize() + self.universe_indices.len() => @@ -758,7 +758,7 @@ impl<'tcx> TypeFolder<'tcx> for BoundVarReplacer<'_, 'tcx> { self.mapped_consts.insert(p, bound_const); self.infcx .tcx - .mk_const(ty::ConstS { val: ty::ConstKind::Placeholder(p), ty: ct.ty() }) + .mk_const(ty::ConstS { kind: ty::ConstKind::Placeholder(p), ty: ct.ty() }) } _ if ct.has_vars_bound_at_or_above(self.current_index) => ct.super_fold_with(self), _ => ct, @@ -878,7 +878,7 @@ impl<'tcx> TypeFolder<'tcx> for PlaceholderReplacer<'_, 'tcx> { } fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> { - if let ty::ConstKind::Placeholder(p) = ct.val() { + if let ty::ConstKind::Placeholder(p) = ct.kind() { let replace_var = self.mapped_consts.get(&p); match replace_var { Some(replace_var) => { @@ -891,7 +891,7 @@ impl<'tcx> TypeFolder<'tcx> for PlaceholderReplacer<'_, 'tcx> { self.universe_indices.len() - index + self.current_index.as_usize() - 1, ); self.tcx().mk_const(ty::ConstS { - val: ty::ConstKind::Bound(db, *replace_var), + kind: ty::ConstKind::Bound(db, *replace_var), ty: ct.ty(), }) } @@ -2018,8 +2018,8 @@ fn confirm_impl_candidate<'cx, 'tcx>( let identity_substs = crate::traits::InternalSubsts::identity_for_item(tcx, assoc_ty.item.def_id); let did = ty::WithOptConstParam::unknown(assoc_ty.item.def_id); - let val = ty::ConstKind::Unevaluated(ty::Unevaluated::new(did, identity_substs)); - tcx.mk_const(ty::ConstS { ty, val }).into() + let kind = ty::ConstKind::Unevaluated(ty::Unevaluated::new(did, identity_substs)); + tcx.mk_const(ty::ConstS { ty, kind }).into() } else { ty.into() }; |
