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

Clarify the usage of "hints" in const_eval. #26683

Merged
merged 1 commit into from
Jul 22, 2015

Conversation

eefriedman
Copy link
Contributor

The "hint" mechanism is essentially used as a workaround to compute
types for expressions which have not yet been type-checked. This
commit clarifies that usage, and limits the effects to the places
where it is currently necessary.

Fixes #26210.

@rust-highfive
Copy link
Collaborator

r? @huonw

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

@eefriedman eefriedman force-pushed the const-eval-hint branch 2 times, most recently from c05e030 to a745d0c Compare June 30, 2015 17:37
@bors
Copy link
Contributor

bors commented Jul 6, 2015

☔ The latest upstream changes (presumably #26757) made this pull request unmergeable. Please resolve the merge conflicts.

@huonw
Copy link
Member

huonw commented Jul 8, 2015

r? @pnkfelix (random person from the compiler subteam)

@rust-highfive rust-highfive assigned pnkfelix and unassigned huonw Jul 8, 2015
substs),
Some(&**ty))
if let ExprTypeChecked = ty_hint {
let substs = tcx.node_id_item_substs(e.id).substs;
Copy link
Member

Choose a reason for hiding this comment

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

(It took me a little while to convince myself that this ends up being equivalent to the effect we were getting before via the get_substs parameter, but I now believe the tables in the tcx should match even in the case where check::_match::check_pat was passing in a closure that calls fcx.item_substs(), so this should be okay.)

@pnkfelix
Copy link
Member

@eefriedman I'm basically all in favor of this PR. I've put some feedback up above but you can treat it as an r=me after a rebase.

The "hint" mechanism is essentially used as a workaround to compute
types for expressions which have not yet been type-checked. This
commit clarifies that usage, and limits the effects to the places
where it is currently necessary.

Fixes rust-lang#26210.
@eefriedman
Copy link
Contributor Author

Rebased.

@oli-obk
Copy link
Contributor

oli-obk commented Jul 22, 2015

ping @pnkfelix

@pnkfelix
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jul 22, 2015

📌 Commit 6bdfb05 has been approved by pnkfelix

@bors
Copy link
Contributor

bors commented Jul 22, 2015

⌛ Testing commit 6bdfb05 with merge d4d4206...

bors added a commit that referenced this pull request Jul 22, 2015
The "hint" mechanism is essentially used as a workaround to compute
types for expressions which have not yet been type-checked. This
commit clarifies that usage, and limits the effects to the places
where it is currently necessary.

Fixes #26210.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants