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

rustc_const_eval::util contains some code that does not belong there #100061

Open
RalfJung opened this issue Aug 2, 2022 · 1 comment
Open

rustc_const_eval::util contains some code that does not belong there #100061

RalfJung opened this issue Aug 2, 2022 · 1 comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@RalfJung
Copy link
Member

RalfJung commented Aug 2, 2022

The rustc_const_eval::util module consists of functions that are never used inside rustc_const_eval, nor do they need any other part of this crate, so these are at the wrong location -- looks like a mistake that was introduced when rustc_mir was split up a while ago, and/or as part of the later split of rustc_mir_transform.

Cc @rust-lang/wg-const-eval @cjgillot
Any suggestions for where this code belongs instead? Some of these are exclusively used by rustc_mir_transform, so they could go there. Some are also used by rustc_borrowck, so I am not sure what the best location is for them. I just know rustc_const_eval is definitely wrong. :)

@RalfJung RalfJung added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Aug 2, 2022
@cjgillot
Copy link
Contributor

cjgillot commented Aug 3, 2022

IIRC, I put these methods there because rustc_const_eval was the most downstream crate that both rustc_borrowck and rustc_mir_transform depended on. I know this is wrong, but I did not really know of a better place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

2 participants