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

Slight inaccuracy in the rustc_mir documentation #85513

Closed
giltho opened this issue May 20, 2021 · 3 comments · Fixed by #95281
Closed

Slight inaccuracy in the rustc_mir documentation #85513

giltho opened this issue May 20, 2021 · 3 comments · Fixed by #95281
Assignees
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug.

Comments

@giltho
Copy link

giltho commented May 20, 2021

Hello,

It feels like this shouldn't be an issue but I don't really know where to post it otherwise..
The documentation of eval_place in the MIR InterpCx says that there is a more efficient solution when the place is access for read called eval_place_for_read, but the latter does not exist anywhere.
I'm guessing it should be referring to eval_place_to_op, but I am not entirely sure. Also as a side question, I'd be curious to know why it is slower to access a place for write than it is for read.

I'm going to spend a bit of time reading that part of the code, if I ever find other tiny things like that, where should I report it ? It feels like this could be a small discussion in a chat followed by a tiny PR rather than an issue.

Thank you !

@scottmcm
Copy link
Member

If you have a question while making a PR, on good resource is Zulip: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp

Depending how easy a PR it is and whether you're reasonably confident in your deduction, you could also just make a PR changing it and the reviewer will confirm that the update is accurate.

@JohnTitor JohnTitor added A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Jun 10, 2021
@pierwill
Copy link
Member

@giltho Your analysis looks correct to me. I'm working up a PR to fix these docs.

@rustbot claim

@pierwill
Copy link
Member

I'm going to spend a bit of time reading that part of the code, if I ever find other tiny things like that, where should I report it ? It feels like this could be a small discussion in a chat followed by a tiny PR rather than an issue.

Issues like this are welcome, as are small PRs. :)

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 26, 2022
Fix inaccurate function name in `rustc_const_eval` docs

Looks to me like this fixes rust-lang#85513. I had trouble making a intra-docs link to `eval_place_to_op` work, though...
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 26, 2022
Fix inaccurate function name in `rustc_const_eval` docs

Looks to me like this fixes rust-lang#85513. I had trouble making a intra-docs link to `eval_place_to_op` work, though...
@bors bors closed this as completed in 0c2cee2 May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants