Skip to content
New issue

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

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

Already on GitHub? # to your account

Update docs related to const-eval/Miri #676

Merged
merged 6 commits into from
May 25, 2020

Conversation

JohnTitor
Copy link
Member

The main point of this PR is to update tcx.const_eval since it was separated into some tcx.const_eval_* queries.
The const-eval chapter is relatively short. But about the miri chapter, I'm totally not sure how we evaluate consts in Miri now instead of tcx.const_eval.
I just replaced tcx.const_eval with tcx.const_eval_* but I guess we could specify the query that we actually use in some places.

r? @oli-obk @RalfJung

@mark-i-m
Copy link
Member

mark-i-m commented May 1, 2020

ping @JohnTitor any updates?

@JohnTitor
Copy link
Member Author

Sorry for the delay, all! I really busy with some other work, and I've finally got time to update here recently.

@JohnTitor JohnTitor changed the title WIP: Update docs related to const-eval Update docs related to const-eval May 21, 2020
@JohnTitor JohnTitor changed the title Update docs related to const-eval Update docs related to const-eval/Miri May 21, 2020
@JohnTitor
Copy link
Member Author

r? @RalfJung and/or @oli-obk, is there anything else you're concerned about?

used) and a `GlobalId`. The `GlobalId` is made up of an
`Instance` referring to a constant or static or of an
`Instance` of a function and an index into the function's `Promoted` table.
The `const_eval_*` queries use a [`ParamEnv`](./param_env.html) of environment
Copy link
Member

Choose a reason for hiding this comment

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

I assume you mean const_eval_poly and friends? These are not queries, they are just wrappers around the const_eval query.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, and I didn't know that. I updated this wording because someone was confused that const_eval doesn't exist on the docs anymore. Addressed via 852baf5.

Co-authored-by: Ralf Jung <post@ralfj.de>
JohnTitor and others added 2 commits May 25, 2020 17:04
Co-authored-by: Ralf Jung <post@ralfj.de>
Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

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

Looks all correct to me. :)
(Still not very exhaustive, but... baby steps.)

@JohnTitor
Copy link
Member Author

Thanks @RalfJung for detailed reviews! I'm going to merge this.

@JohnTitor JohnTitor merged commit c2561c4 into rust-lang:master May 25, 2020
@JohnTitor JohnTitor deleted the const-eval branch May 25, 2020 08:23
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants