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

Access to "rustc_plugin::Registry" for CompilerControllers #36064

Closed
leeopop opened this issue Aug 28, 2016 · 0 comments · Fixed by #36240
Closed

Access to "rustc_plugin::Registry" for CompilerControllers #36064

leeopop opened this issue Aug 28, 2016 · 0 comments · Fixed by #36240

Comments

@leeopop
Copy link
Contributor

leeopop commented Aug 28, 2016

Currently, Registry structure is allocated and used in the rustc_driver (

let mut registry = Registry::new(sess, &krate);
).
It is not accessible by the CompilerController.
The CompilerController can only access the read-only version of CompileState.session.plugin_attributes.
One suggestion is to manage the Registry structure inside the CompilerState structure.

I'll prepare a pull request soon to fix this issue.

@jseyfried @sanxiyn

bors added a commit that referenced this issue Sep 5, 2016
Allow CompilerControllers to access rustc_plugin::registry::Registry

fixes #36064

I chose to put ructc_plugin::registry::Registry structure
into CompilerState structure, instead of Session structure.
This will preserve dependencies among librustc, libructc_driver, and libructc_plugin.

@jseyfried @sanxiyn
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 a pull request may close this issue.

1 participant