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
{{ message }}
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
When capture_disjoint_fields is enabled we see that the compiler ICEs when closure contains something like
let x = 10;let tup = (1,2);let p = Point{x:10,y:20};let c = || {let _ = x;letPoint{ x, y } = p;// 1let(_, _) = tup;// 2};
The problem here is that in case 1 p[0] and p[1] are captured, but when we build MIR we need to get information about the initializer which is p in this case which is missing since p itself isn't captured.
The issue with 2 is that since nothing from tup is used, nothing is captured. Nothing will be read when MIR is built either, but to build MIR we need access to tup, which we don't have.