Skip to content

Explain name of rustc_middle::traits::query::DtorckConstraint #94310

Closed
@pierwill

Description

@pierwill
Member

What does Dtorck in DtorckConstraint stand for? "Destruction check?" Didn't find any answer in a few searches of docs and rustc dev guide.

@rustbot label:T-compiler E-easy

Activity

added
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Feb 24, 2022
b-NC

b-NC commented on Mar 17, 2022

@b-NC
Contributor

@rustbot claim

b-NC

b-NC commented on Mar 24, 2022

@b-NC
Contributor

After a bit of goofing around in the code, I think that Dtor stands for Destructor, so it would be DestructorCheckConstraint, probably

bjorn3

bjorn3 commented on Mar 24, 2022

@bjorn3
Member

I believe other parts of the code refer to it as dropck (drop check) rather than destructor check.

b-NC

b-NC commented on Mar 24, 2022

@b-NC
Contributor

Drop"top"check?
What would the "top" be for then?
Besides, I think Drop makes more sense to Destructor, but in this context, I think destructor makes more sense? ig?

bjorn3

bjorn3 commented on Mar 24, 2022

@bjorn3
Member

It may be that DtorckConstraint was named before we consistently starting to use dropck.

b-NC

b-NC commented on Mar 24, 2022

@b-NC
Contributor

So should this be renamed altogether if that's the case ?
To a name like DropCkConstraint, perhaps?
Well actually, I don't think that's the case because, in 4e42f388, which created that file in the first place, DropCk already appears to be a thing?
So maybe this instance wasn't renamed when dropck started to get used?

bjorn3

bjorn3 commented on Mar 24, 2022

@bjorn3
Member

I think so.

b-NC

b-NC commented on Mar 24, 2022

@b-NC
Contributor

Edited.

bjorn3

bjorn3 commented on Mar 24, 2022

@bjorn3
Member

DtorckConstraint was moved in that commit. You can see that it originated from here: 4e42f388#diff-d2a1fdabeaebb273459e840ceb8ad8eef3e2dd5f8b34b608309587217608216bL104

b-NC

b-NC commented on Mar 24, 2022

@b-NC
Contributor

DtorckConstraint was moved in that commit. You can see that it originated from here: 4e42f388#diff-d2a1fdabeaebb273459e840ceb8ad8eef3e2dd5f8b34b608309587217608216bL104

Right, yeah I meant it was moved.
Renaming it is then.

added a commit that references this issue on Mar 25, 2022

Auto merge of rust-lang#95280 - InfRandomness:infrandomness/Dtorck_cl…

1 remaining item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @bjorn3@pierwill@b-NC@rustbot

    Issue actions

      Explain name of `rustc_middle::traits::query::DtorckConstraint` · Issue #94310 · rust-lang/rust