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.
changed the title [-]Handle `let _ = x` within closures with the feature gate enabled[/-][+]Handle Wildcard pattern within closures with the feature gate enabled[/+]on Dec 2, 2020
changed the title [-]Handle Wildcard pattern within closures with the feature gate enabled[/-][+]Handle patterns within closures with the feature gate enabled[/+]on Dec 4, 2020
Activity
let _ = x
in coercing closures to FnPtr #23_
patterns #27[-]Handle `let _ = x` within closures with the feature gate enabled[/-][+]Handle Wildcard pattern within closures with the feature gate enabled[/+][-]Handle Wildcard pattern within closures with the feature gate enabled[/-][+]Handle patterns within closures with the feature gate enabled[/+]roxelo commentedon Jan 5, 2021
Once this is implemented, also modify the following test so the closure body is:
arora-aman commentedon Jan 15, 2021
Iniital ideas: https://hackmd.io/fgc31ECfQnaxfP9DmjgVNw?view
arora-aman commentedon Jan 22, 2021
More detailed ideas using fake reads for "upvars": https://hackmd.io/fgc31ECfQnaxfP9DmjgVNw
capture_disjoint_fields
is enabled rust#82536Auto merge of rust-lang#82536 - sexxi-goose:handle-patterns-take-2, r…
Auto merge of #82536 - sexxi-goose:handle-patterns-take-2, r=nikomats…