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

Remove some duplication when resolving constants #63766

Merged
merged 1 commit into from
Aug 21, 2019

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Aug 21, 2019

No description provided.

@rust-highfive
Copy link
Collaborator

r? @zackmdavis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 21, 2019
@zackmdavis
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 21, 2019

📌 Commit 7dbc4b9 has been approved by zackmdavis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 21, 2019
}

#[inline]
pub fn eval(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub fn eval(
pub fn interp(

(in a follow up)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if that is an improvement. We could call it normalize?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point was that we use "interp" in other contexts (just look at the module imports 😄) and we have moved away from "eval" so we should be consistent. normalize does seem more specific in this context however so that's better than both interp and eval.

Centril added a commit to Centril/rust that referenced this pull request Aug 21, 2019
Remove some duplication when resolving constants
bors added a commit that referenced this pull request Aug 21, 2019
Rollup of 7 pull requests

Successful merges:

 - #63721 (Do not emit JSON dumps of diagnostic codes)
 - #63753 (Bump toml dependency.)
 - #63755 (Use dedicated type for spans in pre-expansion gating.)
 - #63759 (Allow 'default async fn' to parse.)
 - #63760 (Update books)
 - #63762 (`async_await` was stabilized in 1.39.0, not 1.38.0.)
 - #63766 (Remove some duplication when resolving constants)

Failed merges:

r? @ghost
@bors bors merged commit 7dbc4b9 into rust-lang:master Aug 21, 2019
@oli-obk oli-obk deleted the const_eval_dedup branch March 16, 2021 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants