-
Notifications
You must be signed in to change notification settings - Fork 3
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
Understand MIR scopes #55
Comments
The scopes in MIR have something to do with region checking, which seems related to the borrow checker. The scopes are requires to check "lexical lifetimes". It looks like there is an alternative, more powerful lifetime analysis which is called "non-lexical lifetimes" (NLL, https://rust-lang.github.io/rfcs/2094-nll.html) and is based on the control-flow graph. It is not clear if the scopes are still used for lifetime analysis. References:
|
It seems like NLL is enables in current Rust: rust-lang/rust#43234 (this issue closed as completed) Does that mean that we can ignore the scopes? |
Even if NLL was not enabled, would we be interested in lifetime analysis? If not, we could ignore scopes anyway. |
Mir functions may define variables in nested scopes. We should figure out if these scopes are useful or they can be ignored (i.e. declaring variables in scopes is the same as declaring them at the top level).
Example:
https://github.com/runtimeverification/mir-semantics-compiletest/blob/9251b00e38504a6f1279b0ca9f81b90b4964080d/ui/as-precedence.mir#L40-L79
The text was updated successfully, but these errors were encountered: