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

Possible enhancement for nll::region_infer::RegionInferenceContext #55853

Closed
ljedrz opened this issue Nov 10, 2018 · 0 comments · Fixed by #69967
Closed

Possible enhancement for nll::region_infer::RegionInferenceContext #55853

ljedrz opened this issue Nov 10, 2018 · 0 comments · Fixed by #69967
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ljedrz
Copy link
Contributor

ljedrz commented Nov 10, 2018

I noticed that constraints, constraint_graph and universal_region_relations (all members of the RegionInferenceContext struct) are wrapped in Rcs, but it doesn't seem necessary - none of them are cloned anywhere. I thought this might be done in order to reduce the size of the RegionInferenceContext struct, but the same could also be done to its other components that are bigger than Rc as well.

A comment in region_infer::mod.rs suggests that using an Rc "freezes constraints", but if they are just to be frozen a plain immutable reference could used instead, no?

cc @nnethercote

@jonas-schievink jonas-schievink added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Jan 27, 2019
@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 13, 2020
@bors bors closed this as completed in bf6e715 Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants