Skip to content

Remove RefCell usage from ObligationForest. - #68691

Merged
bors merged 1 commit into
rust-lang:masterfrom
nnethercote:rm-RefCell-from-ObligationForest
Feb 6, 2020
Merged

Remove RefCell usage from ObligationForest.#68691
bors merged 1 commit into
rust-lang:masterfrom
nnethercote:rm-RefCell-from-ObligationForest

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

It's not needed.

This doesn't affect performance, it just simplifies the code a little.

r? @nikomatsakis

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 31, 2020

@nikomatsakisnikomatsakis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r=me modulo nit -- but feel free to ignore, I don't care

Comment threadsrc/librustc_data_structures/obligation_forest/mod.rs Outdated
@nnethercote
nnethercoteforce-pushed the rm-RefCell-from-ObligationForest branch from 215418a to 6ad725eCompareFebruary 6, 2020 01:01
@nnethercote

Copy link
Copy Markdown
ContributorAuthor

@bors rollup=always

@nnethercote

Copy link
Copy Markdown
ContributorAuthor

@bors r=nikomatsakis

@bors

bors commented Feb 6, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 6ad725e has been approved by nikomatsakis

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 6, 2020
@sinkuu

Copy link
Copy Markdown
Contributor

Is there even the need for mem::take? compress is the only method that uses self.node_rewrites, and the method does not recurse. Unless I'm missing something, I think you can just use self.node_rewrites instead of moving it to a local and back.

@nnethercote

Copy link
Copy Markdown
ContributorAuthor

Unless I'm missing something, I think you can just use self.node_rewrites instead of moving it to a local and back.

I tried that, it leads to borrowck errors.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 6, 2020
…ionForest, r=nikomatsakis
Remove `RefCell` usage from `ObligationForest`.
It's not needed.
This doesn't affect performance, it just simplifies the code a little.
r? @nikomatsakis
bors added a commit that referenced this pull request Feb 6, 2020
Rollup of 9 pull requests
Successful merges:
- #68691 (Remove `RefCell` usage from `ObligationForest`.)
- #68751 (Implement `unused_parens` for `const` and `static` items)
- #68788 (Towards unified `fn` grammar)
- #68837 (Make associated item collection a query)
- #68842 (or_patterns: add regression test for #68785)
- #68844 (use def_path_str for missing_debug_impls message)
- #68845 (stop using BytePos for computing spans in librustc_parse/parser/mod.rs)
- #68869 (clean up E0271 explanation)
- #68880 (Forbid using `0` as issue number)
Failed merges:
r? @ghost
@bors
bors merged commit 6ad725e into rust-lang:masterFeb 6, 2020
@nnethercote
nnethercote deleted the rm-RefCell-from-ObligationForest branch February 7, 2020 03:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@nnethercote@bors@sinkuu@nikomatsakis@rust-highfive