diff options
| author | bors <bors@rust-lang.org> | 2022-03-25 14:16:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-25 14:16:13 +0000 |
| commit | 09be68c869d95fe1df0f74a228569101c4e76be7 (patch) | |
| tree | 733bb3bf64b321e3b11e3c6b86dbdbdab69facaf /compiler/rustc_middle | |
| parent | 903427b2e807cb1292388940b3f44f3b061cfebf (diff) | |
| parent | 645620b3b3c77e47fec44431e167555fe1339056 (diff) | |
| download | rust-09be68c869d95fe1df0f74a228569101c4e76be7.tar.gz rust-09be68c869d95fe1df0f74a228569101c4e76be7.zip | |
Auto merge of #95280 - InfRandomness:infrandomness/Dtorck_clarification, r=oli-obk
Swap DtorckConstraint to DropckConstraint This change was made as per suspicion that this struct was never renamed after consistent use of DropCk. This also clarifies the meaning behind the name of this structure. Fixes https://github.com/rust-lang/rust/issues/94310
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/arena.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/traits/query.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/query.rs | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_middle/src/arena.rs b/compiler/rustc_middle/src/arena.rs index f6d8fc5b81f..170dd113f6d 100644 --- a/compiler/rustc_middle/src/arena.rs +++ b/compiler/rustc_middle/src/arena.rs @@ -52,7 +52,7 @@ macro_rules! arena_types { Vec<rustc_middle::traits::query::OutlivesBound<'tcx>> > >, - [] dtorck_constraint: rustc_middle::traits::query::DtorckConstraint<'tcx>, + [] dtorck_constraint: rustc_middle::traits::query::DropckConstraint<'tcx>, [] candidate_step: rustc_middle::traits::query::CandidateStep<'tcx>, [] autoderef_bad_ty: rustc_middle::traits::query::MethodAutoderefBadTy<'tcx>, [] type_op_subtype: diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index cd6ff8254ad..95260e9e917 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -549,7 +549,7 @@ rustc_queries! { query adt_dtorck_constraint( key: DefId - ) -> Result<&'tcx DtorckConstraint<'tcx>, NoSolution> { + ) -> Result<&'tcx DropckConstraint<'tcx>, NoSolution> { desc { |tcx| "computing drop-check constraints for `{}`", tcx.def_path_str(key) } } diff --git a/compiler/rustc_middle/src/traits/query.rs b/compiler/rustc_middle/src/traits/query.rs index 07cfe83b014..d43492c903c 100644 --- a/compiler/rustc_middle/src/traits/query.rs +++ b/compiler/rustc_middle/src/traits/query.rs @@ -143,7 +143,7 @@ impl<'tcx> DropckOutlivesResult<'tcx> { /// A set of constraints that need to be satisfied in order for /// a type to be valid for destruction. #[derive(Clone, Debug, HashStable)] -pub struct DtorckConstraint<'tcx> { +pub struct DropckConstraint<'tcx> { /// Types that are required to be alive in order for this /// type to be valid for destruction. pub outlives: Vec<ty::subst::GenericArg<'tcx>>, @@ -157,17 +157,17 @@ pub struct DtorckConstraint<'tcx> { pub overflows: Vec<Ty<'tcx>>, } -impl<'tcx> DtorckConstraint<'tcx> { - pub fn empty() -> DtorckConstraint<'tcx> { - DtorckConstraint { outlives: vec![], dtorck_types: vec![], overflows: vec![] } +impl<'tcx> DropckConstraint<'tcx> { + pub fn empty() -> DropckConstraint<'tcx> { + DropckConstraint { outlives: vec![], dtorck_types: vec![], overflows: vec![] } } } -impl<'tcx> FromIterator<DtorckConstraint<'tcx>> for DtorckConstraint<'tcx> { - fn from_iter<I: IntoIterator<Item = DtorckConstraint<'tcx>>>(iter: I) -> Self { +impl<'tcx> FromIterator<DropckConstraint<'tcx>> for DropckConstraint<'tcx> { + fn from_iter<I: IntoIterator<Item = DropckConstraint<'tcx>>>(iter: I) -> Self { let mut result = Self::empty(); - for DtorckConstraint { outlives, dtorck_types, overflows } in iter { + for DropckConstraint { outlives, dtorck_types, overflows } in iter { result.outlives.extend(outlives); result.dtorck_types.extend(dtorck_types); result.overflows.extend(overflows); diff --git a/compiler/rustc_middle/src/ty/query.rs b/compiler/rustc_middle/src/ty/query.rs index fe036f4f227..9e48c569c25 100644 --- a/compiler/rustc_middle/src/ty/query.rs +++ b/compiler/rustc_middle/src/ty/query.rs @@ -23,7 +23,7 @@ use crate::traits::query::{ CanonicalTypeOpProvePredicateGoal, CanonicalTypeOpSubtypeGoal, NoSolution, }; use crate::traits::query::{ - DropckOutlivesResult, DtorckConstraint, MethodAutoderefStepsResult, NormalizationResult, + DropckConstraint, DropckOutlivesResult, MethodAutoderefStepsResult, NormalizationResult, OutlivesBound, }; use crate::traits::specialization_graph; |
