Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pierwill opened this issue Feb 24, 2022 · 10 comments · Fixed by #95280
Closed

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

pierwill opened this issue Feb 24, 2022 · 10 comments · Fixed by #95280
Assignees
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@pierwill
Copy link
Member

pierwill commented Feb 24, 2022

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

@rustbot rustbot added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 24, 2022
@b-ncMN
Copy link
Contributor

b-ncMN commented Mar 17, 2022

@rustbot claim

@b-ncMN
Copy link
Contributor

b-ncMN commented Mar 24, 2022

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

@bjorn3
Copy link
Member

bjorn3 commented Mar 24, 2022

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

@b-ncMN
Copy link
Contributor

b-ncMN commented Mar 24, 2022

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
Copy link
Member

bjorn3 commented Mar 24, 2022

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

@b-ncMN
Copy link
Contributor

b-ncMN commented Mar 24, 2022

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
Copy link
Member

bjorn3 commented Mar 24, 2022

I think so.

@b-ncMN
Copy link
Contributor

b-ncMN commented Mar 24, 2022

Edited.

@bjorn3
Copy link
Member

bjorn3 commented Mar 24, 2022

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

@b-ncMN
Copy link
Contributor

b-ncMN commented Mar 24, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants