-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
mir_framework: Problem with exports used by external tools #120130
Copy link
Copy link
Closed
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
c16d3f3 has made it impossible to import some structures in
rustc_mir_frameworkwhen implementing dataflow analyses in external tools.When implementing
AnalysisDomainfor a custom dataflow problem, we can no longer import theForwardorBackwarddirection. Here is the source code of such an implementation.Forwardis needed to set theDirectiontype of theAnalysisDomaintrait. Previously, it was available under thepub useexport, but for now it is private.The default implementation of the
AnalysisDomain::DirectionisForward, so I can simply use the default value as a workaround. However, if I need to write a backward analysis, I must rewrite some parts of the framework in our source code because they cannot be imported.There are other tools in the ecosystem that use that API, e.g.:
These changes will make problems if they decide to update to the recent toolchain.
Could you please take a look at this matter? Are these changes intentional? Could we make some of the exports public again?
cc @nnethercote