-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
[nll] teach SCC about 'static
#53178
Comments
@wesleywiser is going to take a look at this |
Here are some relevant links. This is where we compute the SCCs:
This is the definition of that method: rust/src/librustc_mir/borrow_check/nll/constraints/mod.rs Lines 50 to 56 in 63fe441
It takes a rust/src/librustc_mir/borrow_check/nll/constraints/mod.rs Lines 21 to 24 in 63fe441
as well as a rust/src/librustc_mir/borrow_check/nll/constraints/graph.rs Lines 72 to 75 in 63fe441
The rust/src/librustc_mir/borrow_check/nll/constraints/graph.rs Lines 122 to 129 in 63fe441
To make the change, I think we want to supply an altered graph that adds additional edges. We know that (by definition) Note that a lot of this code changes in my PR #53177 -- in particular, the graph is now parameterized so that |
Right now, if you have a region R where
R: 'static
, the SCC computation in NLL is not aware that this means thatR = 'static
. If we taught it that'static: R
for all R, though, it would put them in the same SCC. This might be a big win for things like html5ever, as it would collapse almost all the regions into one big SCC. (I was doing some profiling on html5ever using the branch from #53177, and it seemed like this would help further drop the overhead.)The text was updated successfully, but these errors were encountered: