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
This commit is contained in:
commit
09be68c869
6 changed files with 19 additions and 19 deletions
|
@ -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:
|
||||
|
|
|
@ -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) }
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue