You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in the long-closed issue referenced by the FIXMEs, it would
be unsound to add nocapture to all reference arguments. The canonical
example is taking &T and returning *const T, i.e., `std::ptr::from_ref`.
Some of the removed test cases suggest that named vs elided vs static
lifetime on the reference would make a difference for capturing, which
is incompatible with all modern takes on Rust opsem.
Hypothetically, we could add some kind of escape analysis on MIR to
determine which arguments can be marked as nocapture. But LLVM can do
that too (often better), so why should we? Plus, if we started doing
such analysis, the test that had the FIXMEs would not be a good place to
exercise it, as all the function bodies are trivial.
0 commit comments