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_middle/src/ty/context.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_middle/src/ty/context.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 610234d45ce..5c0cf534b80 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -902,7 +902,7 @@ impl<'tcx> CanonicalUserType<'tcx> { _ => false, }, - GenericArgKind::Const(ct) => match ct.val() { + GenericArgKind::Const(ct) => match ct.kind() { ty::ConstKind::Bound(debruijn, b) => { // We only allow a `ty::INNERMOST` index in substitutions. assert_eq!(debruijn, ty::INNERMOST); @@ -991,7 +991,7 @@ impl<'tcx> CommonConsts<'tcx> { CommonConsts { unit: mk_const(ty::ConstS { - val: ty::ConstKind::Value(ConstValue::Scalar(Scalar::ZST)), + kind: ty::ConstKind::Value(ConstValue::Scalar(Scalar::ZST)), ty: types.unit, }), } @@ -1300,7 +1300,7 @@ impl<'tcx> TyCtxt<'tcx> { ) -> Const<'tcx> { let reported = self.sess.delay_span_bug(span, msg); self.mk_const(ty::ConstS { - val: ty::ConstKind::Error(DelaySpanBugEmitted { reported, _priv: () }), + kind: ty::ConstKind::Error(DelaySpanBugEmitted { reported, _priv: () }), ty, }) } @@ -2467,7 +2467,7 @@ impl<'tcx> TyCtxt<'tcx> { #[inline] pub fn mk_const_var(self, v: ConstVid<'tcx>, ty: Ty<'tcx>) -> Const<'tcx> { - self.mk_const(ty::ConstS { val: ty::ConstKind::Infer(InferConst::Var(v)), ty }) + self.mk_const(ty::ConstS { kind: ty::ConstKind::Infer(InferConst::Var(v)), ty }) } #[inline] @@ -2487,7 +2487,7 @@ impl<'tcx> TyCtxt<'tcx> { #[inline] pub fn mk_const_infer(self, ic: InferConst<'tcx>, ty: Ty<'tcx>) -> ty::Const<'tcx> { - self.mk_const(ty::ConstS { val: ty::ConstKind::Infer(ic), ty }) + self.mk_const(ty::ConstS { kind: ty::ConstKind::Infer(ic), ty }) } #[inline] @@ -2497,7 +2497,7 @@ impl<'tcx> TyCtxt<'tcx> { #[inline] pub fn mk_const_param(self, index: u32, name: Symbol, ty: Ty<'tcx>) -> Const<'tcx> { - self.mk_const(ty::ConstS { val: ty::ConstKind::Param(ParamConst { index, name }), ty }) + self.mk_const(ty::ConstS { kind: ty::ConstKind::Param(ParamConst { index, name }), ty }) } pub fn mk_param_from_def(self, param: &ty::GenericParamDef) -> GenericArg<'tcx> { |
