Skip to content

move const block checks before lowering step #30930

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

Merged
merged 1 commit into from
Jan 16, 2016
Merged

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 15, 2016

this makes sure the checks run before typeck (which might use the constant or const
function to calculate an array length) and gives prettier error messages in case of for
loops and such (since they aren't expanded yet).

fixes #30887

r? @pnkfelix

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@arielb1
Copy link
Contributor

arielb1 commented Jan 15, 2016

I had the idea for a librustc_checks crate called librustc_passes

@arielb1
Copy link
Contributor

arielb1 commented Jan 15, 2016

I think that is a better name.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 15, 2016

I'm totally emotionless about the name. I just got annoyed with the long build times rebuilding librustc when it doesn`t depend on the check.

@arielb1
Copy link
Contributor

arielb1 commented Jan 15, 2016

That was what I guessed. I wanted to move the solely-changing passes there so that they can be compiled in parallel with librustc_xyz.

this makes sure the checks run before typeck (which might use the constant or const
function to calculate an array length) and gives prettier error messages in case of for
loops and such (since they aren't expanded yet).
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 15, 2016

renamed crate to librustc_passes

@arielb1
Copy link
Contributor

arielb1 commented Jan 15, 2016

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 15, 2016

📌 Commit 1471d93 has been approved by arielb1

bors added a commit that referenced this pull request Jan 16, 2016
this makes sure the checks run before typeck (which might use the constant or const
function to calculate an array length) and gives prettier error messages in case of for
loops and such (since they aren't expanded yet).

fixes #30887

r? @pnkfelix
@bors
Copy link
Collaborator

bors commented Jan 16, 2016

⌛ Testing commit 1471d93 with merge 83c3b7f...

@bors bors merged commit 1471d93 into rust-lang:master Jan 16, 2016
@oli-obk oli-obk deleted the fix/30887 branch January 16, 2016 10:12
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.

Compiler should report const fns that it can't evaluate
5 participants