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