Skip to content

A bunch of little analysis cleanups #830

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 11 commits into from
Jul 20, 2017

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Jul 20, 2017

Some of these I'd been meaning to do for a while and just never got around to. Others are my own ultra nitpicks that I could never feel OK actually leaving in a review, but still want to make anyways :-P

r? @emilio

Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@emilio
Copy link
Contributor

emilio commented Jul 20, 2017

@bors-servo r+

@bors-servo
Copy link

📌 Commit 24ece6d has been approved by emilio

@bors-servo
Copy link

🔒 Merge conflict

@bors-servo
Copy link

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

fitzgen added 11 commits July 20, 2017 15:34
They used to live in the same module, and there was less distinction between
them, so they used to make more sense entangled with each other. Now that they
are in separate files, they need a little bit of disentangling.
Because we can't put the apostrophe in "can't" in variables and type names, it
doesn't read as well as "cannot".
It is obvious from the module that it is in that it is an analysis.
Set insertion returns true if it was *not* already in the set. The assertion was
already correct, but the name was backwards.

Additionally, this removes a `format!` that is unnecessary.
We used to do this traversal all the time, but we can do it the one time, after
we finish constructing the IR graph and before we begin computing any of our
analyses.
…processing replacements

Because these operations mutate the IR graph, its better to be safe and double
check again. Don't worry -- these checks only happen on
`testing_only_extra_assertions` builds!
…eached a fixed point

`ConstrainResult::Changed` is much more legible than `true`.
This is some copy-paste from the template param usage analysis that we don't
need here. We already assume that blacklisted items are `derive(Debug)`able, and
this doesn't change that.
@fitzgen
Copy link
Member Author

fitzgen commented Jul 20, 2017

Thanks for the speedy review :)

@bors-servo r=emilio

@bors-servo
Copy link

📌 Commit faebc0c has been approved by emilio

@bors-servo
Copy link

⌛ Testing commit faebc0c with merge 680094a...

bors-servo pushed a commit that referenced this pull request Jul 20, 2017
A bunch of little analysis cleanups

Some of these I'd been meaning to do for a while and just never got around to. Others are my own ultra nitpicks that I could never feel OK actually leaving in a review, but still want to make anyways :-P

r? @emilio
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: emilio
Pushing 680094a to master...

@bors-servo bors-servo merged commit faebc0c into rust-lang:master Jul 20, 2017
@fitzgen fitzgen deleted the little-analysis-cleanups branch July 20, 2017 23:59
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.

4 participants